Skip to content
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

Changes only detected in Main.elm with cache option enabled #75

Closed
opsb opened this issue Dec 2, 2016 · 6 comments
Closed

Changes only detected in Main.elm with cache option enabled #75

opsb opened this issue Dec 2, 2016 · 6 comments

Comments

@opsb
Copy link
Contributor

opsb commented Dec 2, 2016

With the following config

    module: {
      loaders: [
        {
          test:    /\.elm$/,
          exclude: [/elm-stuff/, /node_modules/],
          loader:  'elm-webpack?cache=true'
        },

changes aren't detected in any elm files except Main.elm. If I remove the cache option then they're detected in all elm files.

(BTW the cache option is otherwise awesome, brought my build down from 60s to less than 3s!)

@heejongahn
Copy link

Isn't this expected behavior? Below is the quotation from the README:

If you add this, when using npm run watch, the loader will only load the dependencies at startup. This could be performance improvement, but know that new files won't be picked up and so won't be watched until you restart webpack.

@opsb
Copy link
Contributor Author

opsb commented Dec 5, 2016

hmm, I understood that to mean that elm-package dependencies were only loaded at startup but perhaps I've misunderstood.

Given that saving Main.elm will pick up changes in all files and still compile quickly (remember it's 1-3 secs vs 60 secs for my build) I'm not quite sure what's going on. I'm now running

fswatch -o src/ --include '*.elm' --exclude 'Main.elm' | xargs -n1 -I{} touch src/Main.elm

so that a rebuild is triggered when any elm file is updated. This way I get the fast rebuilds that the cache option seems to enable but with the same behaviour as when the cache option is disabled (there's perhaps a downside I'm not aware of yet).

@eeue56
Copy link
Contributor

eeue56 commented Dec 16, 2016

should be fixed in 4.0.0. please reopen if not

@eeue56 eeue56 closed this as completed Dec 16, 2016
@yornaath
Copy link

I am experiencing this same issue. Even if i set cache to false.

@eeue56
Copy link
Contributor

eeue56 commented Sep 27, 2017

Did you set cwd?

@mblarsen
Copy link

I am experiencing this same issue. Even if i set cache to false.

Same here. I've tried with cwd set and not set. Why are you asking about cwd @eeue56 ? (trying to learn).

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

No branches or pull requests

5 participants