Skip to content

purs ide mode and new files #100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
coot opened this issue Jul 31, 2017 · 5 comments
Closed

purs ide mode and new files #100

coot opened this issue Jul 31, 2017 · 5 comments

Comments

@coot
Copy link

coot commented Jul 31, 2017

Every time I add a new file, I need to restart webpack so that it's loaded. If we can get that information from webpack, we could ask purs ide to compile that file using

@ethul
Copy link
Owner

ethul commented Aug 9, 2017

Thanks for bringing this up. Apologies for the delay.

Which version for the purs-loader are you using? Also, are you able to provide your webpack config?

I am on webpack 1.x, and with the 3.0.0 purs-loader I haven't had to restart webpack to pick up new files. They are picked up when they are imported from existing files. Perhaps there is something going on in the config?

@coot
Copy link
Author

coot commented Aug 17, 2017

Sorry for the delay too.

I am using webpack 2.x with purs-loader 3.0.0. I don't have a public repo for that, but I'll do something about it.

@ethul
Copy link
Owner

ethul commented Sep 7, 2017

I came across this issue using webpack 3. I need to investigate further, but it seems to be an issue on webpack 2/3 and not webpack 1. In ide mode, it looks like we will need to attempt to add any files to the internal purs module mapping that are dependencies of files that are reloaded.

We might be able to do something here to resolve this:

if (!moduleValue) {
debug('module %s was not found in the map, skipping require', import_);
return null;
}

ethul added a commit that referenced this issue Oct 3, 2017
@ethul ethul closed this as completed in #106 Oct 3, 2017
ethul added a commit that referenced this issue Oct 3, 2017
@coot
Copy link
Author

coot commented Oct 3, 2017

Thanks @ethul I will test it tomorrow.

@ethul
Copy link
Owner

ethul commented Oct 3, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants