We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vue3.0也出来几个月了,抽空回顾不用脚手架搭建vue项目
此次用的webpack5+vue3.0.0.5
和vue2.x版本主要区别:
const VueLoaderPlugin = require('vue-loader/lib/plugin')
const { VueLoaderPlugin } = require('vue-loader')
package.json
//package.json { "name": "vue3_myself", "version": "1.0.0", "description": "采用vebpack自己搭建vue3.x项目", "main": "./src/main.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "dev": "webpack serve" }, "keywords": [ "webpack" ], "author": "叶城宇", "license": "ISC", "devDependencies": { "@vue/compiler-sfc": "^3.0.5", "css-loader": "^5.0.1", "file-loader": "^6.2.0", "html-webpack-plugin": "^4.5.1", "vue-loader": "^16.1.2", "webpack": "^5.19.0", "webpack-cli": "^4.4.0", "webpack-dev-server": "^3.11.2" }, "dependencies": { "vue": "^3.0.5" } } //webpack.config.js const path = require("path") const { VueLoaderPlugin } = require('vue-loader') const HtmlWebpackPlugin = require("html-webpack-plugin") module.exports = { mode: 'development', entry: path.join(__dirname, "src/main.js"), plugins: [new VueLoaderPlugin(), new HtmlWebpackPlugin({ title: "布加拉提", template: "./index.html" }) ], module: { rules: [{ test: /.vue$/, loader: "vue-loader" },{ test: /.css$/, loader: "css-loader" },{ test: /\.(png|svg|jpg|gif)$/, use: [ 'file-loader' ] } ] } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
此次用的webpack5+vue3.0.0.5
和vue2.x版本主要区别:
const VueLoaderPlugin = require('vue-loader/lib/plugin')
;当前vue-loader版本就需要通过const { VueLoaderPlugin } = require('vue-loader')
来引入package.json
The text was updated successfully, but these errors were encountered: