Comments (14)
As of version 4.5.0 of the webpack cli you cannot pass --watch
anymore to the dev server.
ie. webpack serve --watch
will throw an error.
Without --watch
the loader doesn't recompile changes. So atm this loader seems to be incompatible with webpack-cli 4.5. Unless I'm missing some options that need to be passed somewhere else.
from elm-webpack-loader.
I'm also having this problem. To add some info that seems to be the case for me:
- The problem only happens when using
npx webpack-dev-server
- usingnpx webpack --watch
seems to still work just fine? - It only affects the file not referenced in my webpack entry point javascript file. So changes in
Main.elm
do trigger a recompile, while changes in other files (not referenced in JS files) do not.
from elm-webpack-loader.
Having the same issue currently, any workarounds? I went back to 6.0.1
and everything is working fine.
from elm-webpack-loader.
This bug is still a thing, but it only occurs for files that are imported from other files. Entry points load just fine, that's why it's working in that example repo @simonh1000 - there's only one Elm file there. Adding --watch
option to webpack does work, however it recompiles all the files instead of just the one that's been changed.
from elm-webpack-loader.
Agree here. I came to the same issue yesterday.
OS X, version 10.15.6 (19G2021)
p.s. also error message way more nicer in version 6.0.1
p.p.s. thx for your loader!
from elm-webpack-loader.
Same is happening for me. I was using forceWatch: true
from elm-webpack-loader.
Ran into the same issue today, adding --watch
to my dev server script solved it:
"dev": "webpack-dev-server --mode development --port 3000 --hot --watch",
However, my hot reload errors are still broken, instead of the elm compiler output, I just get this in the browser modal overlay:
Failed to compile.
./src/Main.elm
Module build failed (from ./node_modules/elm-webpack-loader/index.js):
Compiler process exited with error Compilation failed
Configs I'm using:
https://github.com/inbucket/inbucket/blob/cf4c5a29bb05bd029221c890ea5ff9842ba295cb/ui/package.json
https://github.com/inbucket/inbucket/blob/cf4c5a29bb05bd029221c890ea5ff9842ba295cb/ui/webpack.config.js
from elm-webpack-loader.
We upgraded to Webpack 5 and this works fine provided that you have --watch
.
In version 6 of this plugin somehow the flag --watch
was not necessary.
from elm-webpack-loader.
I had the same issue and adding the --watch
flag to the webpack-dev-server
command fixed the issue π
from elm-webpack-loader.
But --watch gave me a webpack 5 deprecation warning.
That said, after remove. --watch, I seem to have everything working fine anyway - see simonh1000/elm-webpack-starter#35 for code
from elm-webpack-loader.
at the end of the day, this is a webpack bug, and it might have been fixed. This issue should probably be closed
from elm-webpack-loader.
I'd like to suggest we bring back forceWatch
for a different reason - using this with Storybook. Storybook seems to run its own server which means compiler.watching
is false
. I'm not entirely sure if that can be fixed, but right now it means that I can't get proper dependency tracking in Storybook at all, which really sucks. Just having this flag and letting me set it in my Storybook Webpack config would unblock me.
from elm-webpack-loader.
Just for info, downgrading to webpack before 4.5 is incompatible with dev server see webpack/webpack-cli#2422
from elm-webpack-loader.
had to install live-server
and run webpack --watch --mode=development
"webpack": "4.44.1",
"webpack-cli": "4.5.0"
from elm-webpack-loader.
Related Issues (20)
- Peer dependency issue for elm 0.19.1-1 HOT 8
- Path with a space fails compilation
- The old version of yargs being used in the dependencies has vulnerabilities
- Replacing strings in generated output
- Version 7.0.1/8.0.0 can cause memory problems on Windows HOT 1
- `npm install --save elm-webpack-loader` fails HOT 1
- Webpack 5 error in the browser HOT 1
- This loader should not expect `--watch` for the dev server HOT 9
- Error: Cannot find module 'temp'
- Do not see elm compiler erros in browser console anymore HOT 2
- Problem with the NPM package - 403 Forbidden from dl.bintray.com HOT 1
- elm-webpack-loader appears to be trying to use file without main as an entrypoint HOT 3
- Compilation causing cache errors with version 7 and 8 HOT 1
- 8.0.0 compiles all the Elm files on a single file change HOT 4
- Usage with webpack5's new `cache.type = 'filesystem'` seems broken across builds.
- Elm errors donβt show up on overlay anymore HOT 1
- Facilitate applying patches
- CVE-2022-37601 (update loader-utils to v3)
- quick usage help question - `Compiler process exited with error Compilation failed` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elm-webpack-loader.