Webpack-chunks written to root dir
0xR opened this issue · comments
I followed the instructions from the readme and I get this error:
Unhandled rejection Error: EACCES: permission denied, open '/webpack-chunks.json'
I am running webpack-dev-server --config webpack.client.config.js
. It turns out that webpack_config.output.path
get overwritten to /
.
webpack.client.config.js:
const clientConfig = client_configuration(configuration, settings);
console.log('client config', clientConfig.output.path);
export default clientConfig;
chunk.js
function chunk_info_file_path(webpack_configuration) {
console.log('chunk location', webpack_configuration.output.path)
output:
client config /home/myproject/dist/public
chunk location /
When I run webpack --config webpack.client.config.js
I have no issue.
Is this error thrown during webpack development build?
Post your webpack development configuration then.
Ok, so you get this error when running just the single webpack-dev-server --config ...
command but this error is not present when you run just the single webpack --config ...
command.
That's an unexpected behaviour.
You can share a project so that I could reproduce and possibly fix the issue.
Or maybe I can do it without a sample project.
This bug could mean that webpack-dev-server
alters the configuration after it is run.
What I could do is simply clone the configuration here:
https://github.com/halt-hammerzeit/universal-webpack/blob/master/source/client%20configuration.js#L18
I'll try it and release a new version.
Try universal-webpack@0.1.13
That fixed it! Thanks for your great support!