Answer the question
In order to leave comments, you need to log in
DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead, how to fix?
(node:23725) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
TypeError: dep.getResourceIdentifier is not a function
at addDependency (/var/php/www/TC.develop/template/test5/node_modules/webpack/lib/Compilation.js:665:30)
at iterationOfArrayCallback (/var/php/www/TC.develop/template/test5/node_modules/webpack/lib/Compilation.js:186:3)
at addDependenciesBlock (/var/php/www/TC.develop/template/test5/node_modules/webpack/lib/Compilation.js:687:5)
at Compilation.processModuleDependencies (/var/php/www/TC.develop/template/test5/node_modules/webpack/lib/Compilation.js:698:4)
at afterBuild (/var/php/www/TC.develop/template/test5/node_modules/webpack/lib/Compilation.js:830:15)
at buildModule.err (/var/php/www/TC.develop/template/test5/node_modules/webpack/lib/Compilation.js:874:11)
at callback (/var/php/www/TC.develop/template/test5/node_modules/webpack/lib/Compilation.js:611:5)
at module.build.error (/var/php/www/TC.develop/template/test5/node_modules/webpack/lib/Compilation.js:651:12)
at handleParseResult (/var/php/www/TC.develop/template/test5/node_modules/webpack/lib/NormalModule.js:441:12)
at doBuild.err (/var/php/www/TC.develop/template/test5/node_modules/webpack/lib/NormalModule.js:463:6)
at runLoaders (/var/php/www/TC.develop/template/test5/node_modules/webpack/lib/NormalModule.js:327:12)
at /var/php/www/TC.develop/template/test5/node_modules/loader-runner/lib/LoaderRunner.js:370:3
at iterateNormalLoaders (/var/php/www/TC.develop/template/test5/node_modules/loader-runner/lib/LoaderRunner.js:211:10)
at Array.<anonymous> (/var/php/www/TC.develop/template/test5/node_modules/loader-runner/lib/LoaderRunner.js:202:4)
at Storage.finished (/var/php/www/TC.develop/template/test5/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:43:16)
at provider (/var/php/www/TC.develop/template/test5/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:79:9)
at /var/php/www/TC.develop/template/test5/node_modules/graceful-fs/graceful-fs.js:78:16
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:525:3)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
{
"name": "test5",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"devDependencies": {
"webpack-cli": "^3.1.0"
},
"private": true,
"scripts": {
"dev-server": "encore dev-server",
"dev": "encore dev",
"watch": "encore dev --watch",
"build": "encore production"
},
"dependencies": {
"@symfony/webpack-encore": "^0.20.1",
"axios": "^0.18.0",
"babel-loader": "^7.1.5",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"cross-env": "^5.2.0",
"css-loader": "^1.0.0",
"encore": "^0.0.30-beta",
"node-sass": "^4.9.2",
"sass-loader": "^7.0.3",
"vue": "^2.5.16",
"vue-loader": "^15.2.6",
"vue-material": "^1.0.0-beta-10.2",
"vue-server-renderer": "^2.5.16",
"vue-template-compiler": "^2.5.16",
"vuex": "^3.0.1",
"webpack": "^4.16.3"
}
}
var Encore = require('@symfony/webpack-encore');
Encore
// the project directory where compiled assets will be stored
.setOutputPath('public/build/')
// the public path used by the web server to access the previous directory
.setPublicPath('/build')
.cleanupOutputBeforeBuild()
.enableSourceMaps(!Encore.isProduction())
// create hashed filenames (e.g. app.abc123.css)
.enableVersioning(Encore.isProduction())
.enableVueLoader()
.enableSassLoader()
.addEntry('js/client', './assets/js/client.js')
.addEntry('js/server', './assets/js/server.js')
.configureBabel(function(babelConfig) {
babelConfig.plugins = ["transform-object-rest-spread"]//, "vue-material"]
})
;
module.exports = Encore.getWebpackConfig();
Answer the question
In order to leave comments, you need to log in
General warning, it is recommended to use the new API, the use of Tapable.plugin is not recommended and will be removed soon.
And in the error it is also clearly written that dep.getResourceIdentifier
it is not a function, perhaps somewhere a typo.
Today we need another solution.
https://github.com/webpack/webpack/issues/6568
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question