用户1122511
2018-08-16 18:12
const path = require('path')//获取路径const VueLoaderPlugin = require('vue-loader/lib/plugin')module.exports = {target: 'web',entry: path.join(__dirname, 'src/index.js'),//入口文件output: {filename : 'bundle.js',//生成文件path: path.join(__dirname, 'dist')//路径},module: {rules: [{test: /\.vue$/, use: 'vue-loader'},{test: /\.css$/, use: [{ loader: "style-loader" },{ loader: "css-loader" }]},{test: '/\.styl$/',use: [{ loader: "style-loader" },{ loader: "css-loader" } ,{ loader: "stylus-loader"}]},{test: /\.(gif|jpg|jpeg|png|svg)$/,use:[{loader: 'url-loader',options: {limit: 1024,name: '[name].[ext]'}},]}],},plugins: [new VueLoaderPlugin()]}
npm install stylus
npm install stylus-loader
Vue+Webpack打造todo应用
84606 学习 · 787 问题
相似问题
回答 4
回答 1