gpt4 book ai didi

Can't I use Vue2.7 with Webpack5?(Vue2.7不能和Webpack5一起使用吗?)

转载 作者:bug小助手 更新时间:2023-10-27 20:26:28 28 4
gpt4 key购买 nike



I've searched hours and red thousands posts, but I didn't found appropriate solution.

我搜索了几个小时,删除了数千条帖子,但没有找到合适的解决方案。


I want to use Webpack5 with Vue2.

Therefore I upgrade vue to ^2.7.14 and vue/cli and it's pulgins to ^5.0.6.

because when I saw the Official Doc of Vue and Vue CLI, it seems they support Webpack 5 if vue and vue/cli version like above.

(I refer to this page.)

我想把WebPack5和Vue2一起使用。因此,我将vue升级到^2.7.14,将vue/cli升级到^5.0.6。因为当我看到VUE和VUE CLI的官方文档时,似乎他们支持webpack 5 IF VUE和VUE/CLI版本如上。(我指的是这个页面。)


enter image description here


enter image description here


But when I write npm run serve at terminal it still has error.

但是当我写NPM在终端运行服务时,它仍然有错误。


 ERROR  ValidationError: Progress Plugin Invalid Options

options should NOT have additional properties
options should NOT have additional properties
options should NOT have additional properties
options should pass "instanceof" keyword validation
options should match exactly one schema in oneOf

ValidationError: Progress Plugin Invalid Options

options should NOT have additional properties
options should NOT have additional properties
options should NOT have additional properties
options should pass "instanceof" keyword validation
options should match exactly one schema in oneOf

at validateOptions (C:\Project\workmanager-frontend\node_modules\webpack\node_modules\schema-utils\src\validateOptions.js:32:11)
at new ProgressPlugin (C:\Project\workmanager-frontend\node_modules\webpack\lib\ProgressPlugin.js:62:3)
at new Progress (C:\Project\workmanager-frontend\node_modules\progress-webpack-plugin\index.js:25:21)
at new progressPlugin (C:\Project\workmanager-frontend\node_modules\progress-webpack-plugin\index.js:127:10)
at C:\Project\workmanager-frontend\node_modules\webpack-chain\src\Plugin.js:14:18
at Object.toConfig (C:\Project\workmanager-frontend\node_modules\webpack-chain\src\Plugin.js:78:22)
at C:\Project\workmanager-frontend\node_modules\webpack-chain\src\Config.js:129:63
at Array.map (<anonymous>)
at module.exports.toConfig (C:\Project\workmanager-frontend\node_modules\webpack-chain\src\Config.js:129:40)
at Service.resolveWebpackConfig (C:\Project\workmanager-frontend\node_modules\@vue\cli-service\lib\Service.js:277:34)
at PluginAPI.resolveWebpackConfig (C:\Project\workmanager-frontend\node_modules\@vue\cli-service\lib\PluginAPI.js:132:25)
at serve (C:\Project\workmanager-frontend\node_modules\@vue\cli-service\lib\commands\serve.js:75:31)
at Service.run (C:\Project\workmanager-frontend\node_modules\@vue\cli-service\lib\Service.js:262:12)
at processTicksAndRejections (node:internal/process/task_queues:96:5)

I tried to delete node-modules and npm i

and package-lock.json and npm i

comment out /node=modules/@vue/cli-service/lib/commands/serve.js

我尝试删除节点模块和npm I以及Package-lock.json和npm我注释掉了/node=modules/@vue/cli-service/lib/commands/serve.js


if (!process.env.VUE_CLI_TEST && options.devServer.progress !== false) {
// // the default progress plugin won't show progress due to infrastructreLogging.level
// webpackConfig
// .plugin('progress')
// .use(require('progress-webpack-plugin'))
// }

but nothing works.

但这一切都不管用。


I could downgrade vue/cli, but before that I want to know that whether it's possible to use Webpack5 with vue 2.7, vue/cli5.

我可以降低VUE/CLI的级别,但在此之前,我想知道是否可以将WebPack5与VUE 2.7、VUE/CLI一起使用。


below is my package.json

下面是我的Package.json



"dependencies": {
"@fortawesome/fontawesome-free": "^6.2.1",
"@fortawesome/fontawesome-svg-core": "^6.2.1",
"@fortawesome/free-brands-svg-icons": "^6.2.1",
"@fortawesome/free-regular-svg-icons": "^6.2.1",
"@fortawesome/free-solid-svg-icons": "^6.2.1",
"@fortawesome/vue-fontawesome": "^2.0.9",
"@fullcalendar/core": "^5.11.4",
"@fullcalendar/daygrid": "^5.11.3",
"@fullcalendar/interaction": "^5.11.3",
"@fullcalendar/list": "^5.11.3",
"@fullcalendar/timegrid": "^5.11.3",
"@fullcalendar/vue": "^5.11.4",
"ag-grid-community": "^25.3.0",
"ag-grid-vue": "^25.3.0",
"axios": "^0.21.1",
"billboard.js": "^2.2.6",
"bootstrap": "^4.6.1",
"bootstrap-vue": "^2.21.2",
"chart.js": "^3.9.1",
"chartkick": "^3.2.1",
"core-js": "^3.8.3",
"cors": "^2.8.5",
"es-abstract": "^1.19.1",
"floating-vue": "^1.0.0-beta.19",
"hchs-vue-charts": "^1.2.8",
"hooper": "^0.3.4",
"i18next-scanner": "^4.1.1",
"jquery": "^3.6.0",
"jspdf": "^2.4.0",
"lodash": "^4.17.21",
"moment": "^2.29.4",
"node-sass": "^6.0.1",
"pdfjs-dist": "^2.10.377",
"popper.js": "^1.16.1",
"prismjs": "^1.27.0",
"quasar": "^2.2.1",
"tippy.js": "^6.3.7",
"translate-google": "^1.5.0",
"v-calendar": "^2.4.1",
"v-jsoneditor": "^1.4.5",
"vee-validate": "^2.2.15",
"vue": "^2.7.14",
"vue-advanced-cropper": "^1.8.2",
"vue-chartjs": "^4.1.1",
"vue-chartkick": "^0.6.1",
"vue-codemirror": "^4.0.6",
"vue-i18n": "^8.26.3",
"vue-js-toggle-button": "^1.3.3",
"vue-json-viewer": "^2.2.22",
"vue-loading-overlay": "^3.4.2",
"vue-prism-editor": "^1.3.0",
"vue-property-decorator": "^8.5.1",
"vue-resource": "^1.5.3",
"vue-router": "^3.5.3",
"vue-slide-up-down": "^2.0.1",
"vue-spinner": "^1.0.4",
"vue-sweetalert2": "^4.3.1",
"vuedraggable": "^2.24.3",
"vuejs-datepicker": "^1.6.2",
"vuex": "^3.6.2",
"xlsx": "^0.17.5"
},
"devDependencies": {
"@babel/core": "^7.12.16",
"@babel/eslint-parser": "^7.12.16",
"@babel/plugin-transform-optional-chaining": "^7.22.6",
"@storybook/addon-essentials": "^7.4.0",
"@storybook/addon-interactions": "^7.4.0",
"@storybook/addon-links": "^7.4.0",
"@storybook/blocks": "^7.4.0",
"@storybook/testing-library": "^0.2.0",
"@storybook/vue": "^7.4.0",
"@storybook/vue-webpack5": "^7.4.0",
"@vue/cli-plugin-babel": "^5.0.6",
"@vue/cli-plugin-eslint": "^5.0.6",
"@vue/cli-service": "^5.0.6",
"chromatic": "^6.24.1",
"eslint": "^7.32.0",
"eslint-plugin-storybook": "^0.6.13",
"eslint-plugin-vue": "^9.17.0",
"expose-loader": "^0.7.5",
"html-loader": "^1.3.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"sass-loader": "^10.1.1",
"storybook": "^7.4.0",
"style-loader": "^2.0.0",
"vue-loader": "^15.10.2"
},

更多回答

just go for vue 2.7 and vite

只要去买Vue 2.7和Vite就行了

If i can I do, but now I have to use vue2.7 and webpack

如果可以的话我会的,但现在我不得不用vue2.7和webpack

优秀答案推荐
更多回答

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com