forked from jhnns/rewire-webpack
-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Rens Baardman edited this page Jun 12, 2019
·
6 revisions
This is collection of various errors and warnings that you can encounter when using any variation (or lack of) rewire
, webpack
, rewire-webpack
(the original version), the fork dribba/rewire-webpack
and this fork rewire-webpack-plugin
.
$ webpack
Hash: 9041342f61ee15f58a1a
Version: webpack 4.33.0
Time: 4080ms
Built at: 06/12/2019 12:30:15 PM
Asset Size Chunks Chunk Names
null.js 5.4 MiB null [emitted] null
Entrypoint null = null.js
[0] util (ignored) 15 bytes {null} [built]
[1] util (ignored) 15 bytes {null} [built]
[2] buffer (ignored) 15 bytes {null} [optional] [built]
[3] crypto (ignored) 15 bytes {null} [optional] [built]
[./node_modules/eslint/lib sync recursive] ./node_modules/eslint/lib sync 160 bytes {null} [built]
[./node_modules/eslint/lib/config sync recursive] ./node_modules/eslint/lib/config sync 160 bytes {null} [built]
[./node_modules/eslint/lib/config sync recursive ^.*\/package\.json$] ./node_modules/eslint/lib/config sync ^.*\/package\.json$ 160 bytes {null} [optional] [built]
[./node_modules/import-fresh sync recursive] ./node_modules/import-fresh sync 160 bytes {null} [built]
[./node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 472 bytes {null} [built]
[./node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 497 bytes {null} [built]
[./require-rewire.js] 68 bytes {null} [built]
+ 665 hidden modules
WARNING in ./node_modules/eslint/lib/linter.js 451:46-65
Critical dependency: the request of a dependency is an expression
@ ./node_modules/eslint/lib/api.js
@ ./node_modules/rewire/lib/moduleEnv.js
@ ./node_modules/rewire/lib/rewire.js
@ ./node_modules/rewire/lib/index.js
@ ./require-rewire.js
... 8 similar warnings omitted ...
WARNING in ./node_modules/rewire/lib/moduleEnv.js
Module not found: Error: Can't resolve 'coffee-script' in 'xxx/node_modules/rewire/lib'
@ ./node_modules/rewire/lib/moduleEnv.js
@ ./node_modules/rewire/lib/rewire.js
@ ./node_modules/rewire/lib/index.js
@ ./require-rewire.js
... 1 similar warning omitted ...
WARNING in ./node_modules/rewire/lib/moduleEnv.js 85:34-52
require.extensions is not supported by webpack. Use a loader instead.
@ ./node_modules/rewire/lib/rewire.js 6:16-41
@ ./node_modules/rewire/lib/index.js
@ ./require-rewire.js
... 5 similar warning omitted ...
ERROR in ./node_modules/eslint/lib/cli-engine.js
Module not found: Error: Can't resolve 'fs' in 'xxx/node_modules/eslint/lib'
@ ./node_modules/eslint/lib/cli-engine.js 18:11-24
@ ./node_modules/eslint/lib/api.js
@ ./node_modules/rewire/lib/moduleEnv.js
@ ./node_modules/rewire/lib/rewire.js
@ ./node_modules/rewire/lib/index.js
@ ./require-rewire.js
... 25 similar errors omitted ...
Add rewire-webpack-plugin
to your webpack config:
// webpack.config.js
const RewireWebpackPlugin = require("rewire-webpack-plugin");
module.exports = {
// ...
plugins: [
new RewireWebpackPlugin()
]
};