What happened?
I'm trying to use a built-in webpack plugin, for example:
const { SourceMapDevToolPlugin } = require('webpack');
module.exports = {
devtool: false,
plugins: [new SourceMapDevToolPlugin({})],
}
and I get one of two errors depending on whether I include webpack as a dependency in the configuration:
[webpack-cli] Error: Cannot find module 'webpack'
[webpack-cli] TypeError: The 'compilation' argument must be an instance of Compilation
Version
Development (host) and target OS/architectures:
Output of bazel --version:
Version of the Aspect rules, or other relevant rules from your
WORKSPACE or MODULE.bazel file:
How to reproduce
Full repro workspace here of every variant I tried: https://github.com/titanous/rules_webpack_require_error
Any other information?
No response
Fund our work
What happened?
I'm trying to use a built-in webpack plugin, for example:
and I get one of two errors depending on whether I include webpack as a dependency in the configuration:
Version
Development (host) and target OS/architectures:
Output of
bazel --version:Version of the Aspect rules, or other relevant rules from your
WORKSPACEorMODULE.bazelfile:How to reproduce
Full repro workspace here of every variant I tried: https://github.com/titanous/rules_webpack_require_error
Any other information?
No response
Fund our work