Closed dimamarksman closed 7 years ago
It would be useful for working with the webpack devserver
It should be already happening...get the latest and change a json ,it will compile and emit the output . Please let me know if I didn't get your question right ?
It does not work for me. When i change a json which is not in the webpack entry but in the plugin group pattern it does not rewrite output json file
How are you starting your webpack dev server ?paste the start script here. It should be working fine ,because previous issue I just fixed and users confirmed its working on their side. Use --inline flag while starting webpack dev server
Thank you for your reply!
I decided to test your repo :)
I cloned this repo and run project locally.
First of all when I try to npm start
in the example folder i get an error:
merge-jsons-webpack-plugin\example\node_modules\webpack-dev-server\bin\webpack-dev-server.js:361
Error: `output.path` needs to be an absolute path or `/`.
I fixed it by:
output: {
path: path.resolve(__dirname, 'dist'),
filename: "[name].bundle.js",
}
After it runs and compiles json successfully.
But when I change for instance /jsons/file1.json
it does not update ./out/module1/module2/en.json
Cheers
hi @dimamarksman ,are you still facing the issue? am closing the issue, if you need you can reopen it.
I'm wondering if it is possible to add a watcher to track any changes in json and rewrite output file.