-
Notifications
You must be signed in to change notification settings - Fork 272
Open
Description
I am using Angular CLI to build the app and have svg-sprite-loader config in the custom webpack configuration file.
Here's the full stacktrace of the issue
.(node:28420) [DEP_WEBPACK_COMPILATION_NORMAL_MODULE_LOADER_HOOK] DeprecationWarning: Compilation.hooks.normalModuleLoader was moved to NormalModule.getCompilationHooks(compilation).loader
at getNormalModuleLoader (C:\work\alphatax-cloud-developer-tools-ui\node_modules\@angular-devkit\build-angular\node_modules\webpack\lib\Compilation.js:436:39)
at get normalModuleLoader [as normalModuleLoader] (C:\work\alphatax-cloud-developer-tools-ui\node_modules\@angular-devkit\build-angular\node_modules\webpack\lib\Compilation.js:870:12)
at C:\work\alphatax-cloud-developer-tools-ui\node_modules\svg-sprite-loader\lib\plugin.js:79:16
at Hook.eval [as call] (eval at create (C:\work\alphatax-cloud-developer-tools-ui\node_modules\tapable\lib\HookCodeFactory.js:19:10), <anonymous>:28:1)
at Hook.CALL_DELEGATE [as _call] (C:\work\alphatax-cloud-developer-tools-ui\node_modules\tapable\lib\Hook.js:14:14)
at Compiler.newCompilation (C:\work\alphatax-cloud-developer-tools-ui\node_modules\@angular-devkit\build-angular\node_modules\webpack\lib\Compiler.js:1121:30)
at C:\work\alphatax-cloud-developer-tools-ui\node_modules\@angular-devkit\build-angular\node_modules\webpack\lib\Compiler.js:1166:29
at eval (eval at create (C:\work\alphatax-cloud-developer-tools-ui\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:20:1)
My custom webpack config is this:
const path = require('path');
const SpritePlugin = require('svg-sprite-loader/plugin');
module.exports = {
resolve: {
fallback: {
module: false,
process: false
}
},
module: {
rules: [
{
test: /\.(svg)$/,
use: [
{
loader: 'svg-sprite-loader',
options: {
extract: true,
outputPath: 'assets/svg-sprites/',
spriteFilename: svgPath => {
return svgPath.includes('a-icons') ? '1-sprite.svg' : '2-sprite.svg'
}
}
},
],
include: [
path.join(__dirname, 'projects/ui/src/assets/icons'),
],
},
],
},
plugins: [
new SpritePlugin()
]
}
Any idea why i see the deprecation warning?
The sprite loader version I am using is 6.0.11
Plonq, shulginms, TroublemakerSt, jonathanlevaillant and vadim-dudin
Metadata
Metadata
Assignees
Labels
No labels