-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
47 lines (46 loc) · 1.32 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
let path = require("path");
let onServerHostFolder = "my-root";
module.exports = {
entry: './src/js/script.js',
output: {
path: path.resolve(__dirname, "build"),
publicPath: `/${onServerHostFolder}/`,
filename: "bundle.js"
},
resolve: {
extensions: ['.vue', '.js'],
alias: {
'vue$': 'vue/dist/vue.esm.js'
},
},
devtool: "source-map", // any "source-map"-like devtool is possible
devServer: { inline: true },
module: {
rules: [
{
test: /\.vue$/,
loader: 'vue-loader',
options: {
loaders: {
scss: 'vue-style-loader!css-loader!sass-loader', // <style lang="scss">
sass: 'vue-style-loader!css-loader!sass-loader?indentedSyntax' // <style lang="sass">
}
}
},
{
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
loader: 'url-loader',
query: {
limit: 10000
}
},
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url-loader',
query: {
limit: 10000
}
}
]
}
}