Webpack-cli: Problems with config resolving

Created on 12 Oct 2020  路  1Comment  路  Source: webpack/webpack-cli

I believe I have found the issue. The path needs to be relative.

This does not work: webpack --config webpack.config.js

This works: webpack --config ./webpack.config.js

The reason for the confusion is that it was not needed in webpack 4.

_Originally posted by @SoerenSilkjaer in https://github.com/webpack/webpack/issues/11643#issuecomment-706902767_

Most helpful comment

From the original issue it sounds like the problem only occurs with persistent caching as config filename is passed to buildDependencies. Pass the absolute filename otherwise webpack will try to resolve it relative to context which might not be identical to cwd.

>All comments

From the original issue it sounds like the problem only occurs with persistent caching as config filename is passed to buildDependencies. Pass the absolute filename otherwise webpack will try to resolve it relative to context which might not be identical to cwd.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

snitin315 picture snitin315  路  5Comments

logo749 picture logo749  路  4Comments

sam-s4s picture sam-s4s  路  5Comments

aleksandrlat picture aleksandrlat  路  3Comments

anyulled picture anyulled  路  4Comments