-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
29 lines (27 loc) · 940 Bytes
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
const path = require('path')
const htmlWebpackPlugin = require('html-webpack-plugin')
const vueLoaderPlugin = require('vue-loader/lib/plugin')
module.exports = {
entry:path.join(__dirname,'./src/main.js'),
output:{
path:path.join(__dirname,'./dist'),
filename:'bundle.js'
},
plugins:[
new htmlWebpackPlugin({
template:path.join(__dirname,'./src/index.html'),
filename:'index.html'
}),
new vueLoaderPlugin()
],
module:{
rules:[
{ test:/\.vue$/, use:"vue-loader" },
{ test:/\.js$/, use:"babel-loader", exclude:/node_modules/ },
{ test:/\.css$/, use:['style-loader','css-loader'] },
{ test:/\.(ttf|eot|svg|woff|woff2)/, use:'url-loader'},
{ test:/\.(jpg|png|gif|jpeg)/, use:'url-loader' },
{test:/\.scss$/,use:['style-loader','css-loader','sass-loader']}
]
}
}