Vue.js 如何降级Nuxt.js使用的网页包版本?
当我尝试为生产构建我的Nuxt.js项目时,出现以下错误:Vue.js 如何降级Nuxt.js使用的网页包版本?,vue.js,webpack,nuxt.js,Vue.js,Webpack,Nuxt.js,当我尝试为生产构建我的Nuxt.js项目时,出现以下错误: Error: Path variable [contenthash:7] not implemented in this context: fonts/[contenthash:7].eot at fn (/home/mike/job/daily-fashion/node_modules/@nuxt/webpack/node_modules/webpack/lib/TemplatedPathPlugin.js:45:11) 我
Error: Path variable [contenthash:7] not implemented in this context: fonts/[contenthash:7].eot
at fn (/home/mike/job/daily-fashion/node_modules/@nuxt/webpack/node_modules/webpack/lib/TemplatedPathPlugin.js:45:11)
我在谷歌上发现了这个问题,其中建议将Webpack降级到4.28以解决这个问题。问题是,我不知道如何降级,因为它是Nuxt.js的内部依赖项
我正在使用nuxt@2.11.0. 以下是其依赖项在package-lock.json中的显示方式:
"@nuxt/webpack": {
"version": "2.11.0",
"resolved": "https://registry.npmjs.org/@nuxt/webpack/-/webpack-2.11.0.tgz",
"integrity": "sha512/yaT2lonYOQYUrsg==",
"requires": {
....
"webpack": "^4.41.3",
...
},
有没有建议如何让Nuxt.js使用旧版本的webpack?谢谢 我在package.json中使用此解决方案
"nuxt": "2.3.4",