-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebpack.config.js
More file actions
39 lines (37 loc) · 835 Bytes
/
Copy pathwebpack.config.js
File metadata and controls
39 lines (37 loc) · 835 Bytes
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
const path = require("path");
const Livereload = require("webpack-livereload-plugin");
const VueLoaderPlugin = require("vue-loader/lib/plugin");
module.exports = {
entry: "./src/index.js",
output: {
filename: "main.js",
path: path.resolve(__dirname, "/docs")
},
resolve: {
alias: {
vue$: "vue/dist/vue.esm.js"
},
extensions: [".js", ".vue"]
},
module: {
rules: [
{
test: /\.vue$/,
loader: "vue-loader"
},
// this will apply to both plain `.css` files
// AND `<style>` blocks in `.vue` files
{
test: /\.css$/,
use: ["vue-style-loader", "css-loader"]
}
]
},
plugins: [new VueLoaderPlugin(), new Livereload()],
devServer: {
contentBase: __dirname,
compress: true,
port: 9000
},
mode: "production"
};