So basically I have a project using Webpack, if I build using Webpack -w
, editing the file with another editor will trigger the watch; however if I edit the file using Webstorm, nothing will happen.
I have came across this post, which seems I'm not the only one, however that solution is for Ubuntu, so I was wondering if there is anything similar for Windows?
Thanks
Using Watch Mode You can instruct webpack to "watch" all files within your dependency graph for changes. If one of these files is updated, the code will be recompiled so you don't have to run the full build manually. Now run npm run watch from the command line and see how webpack compiles your code.
Other Ways to Enable Watch Mode You can also enable watch mode from your Webpack config file: module. exports = { mode: 'development', watch: true, // Enable watch mode entry: { app: `${__dirname}/app. js` }, target: 'web', output: { path: `${__dirname}/bin`, filename: '[name].
Seems Webpack watch doesn't work if the file is not saved directly. Please try turning 'Safe write
' option ( Settings | Appearance & Behavior | System Settings | Use "safe write" (save changes to temporary file first)
) off.
In 2020.* the option name is Back up files before saving
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With