Answer the question
In order to leave comments, you need to log in
Can you share vuejs 2 config with webpack 2?
Here is my config:
"scripts": {
"dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot",
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules"
},
"dependencies": {
"uglifyjs-webpack-plugin": "^0.4.3",
"vue": "^2.3.3",
"vue-router": "^2.5.3"
},
"devDependencies": {
"babel-core": "^6.0.0",
"babel-loader": "^6.0.0",
"babel-preset-env": "^1.5.1",
"cross-env": "^3.0.0",
"css-loader": "^0.25.0",
"file-loader": "^0.9.0",
"node-sass": "^4.5.0",
"sass-loader": "^5.0.1",
"vue-loader": "^12.1.0",
"vue-template-compiler": "^2.3.3",
"webpack": "^2.6.1",
"webpack-dev-server": "^2.4.5"
}
Answer the question
In order to leave comments, you need to log in
install vue-cli globally via npm, then run vue-init webpack-simple, add vue-router and what else you need manually via npm.
The "webpack" template works, but only to the extent that it exists. At least bootstrap-vue did not work (css was not included, unlike the webpack-simple template). Well, I don't know how to cook.
All the magic happens by itself, if everything is done in .vue files, vue-loader is responsible for this :
Read more here: vue-loader.vuejs.org/en/configurations/pre-process...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question