-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebpack.config.js
More file actions
67 lines (65 loc) · 2.04 KB
/
Copy pathwebpack.config.js
File metadata and controls
67 lines (65 loc) · 2.04 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
(function () {
"use strict";
const production = process.env.NODE_ENV !== 'development';
const path = require('path');
const webpack = require('webpack');
module.exports = {
mode: "development", // "production" | "development" | "none"
entry: path.resolve(__dirname, "./src/picker.js"), // string | object | array
output: {
path: path.resolve(__dirname, "dist"),
filename: "./[name].bundle.js",
publicPath: 'http://localhost:9000/'
},
module: {
rules: [
{
test: /\.vue$/,
use: [{
loader: "vue-loader"
}]
},
{
test: /\.(.?)css$/,
use: [{
loader: "style-loader"
}, {
loader: "css-loader"
}]
},
{
test: /\.scss$/,
use: [{
loader: 'sass-loader'
}]
},
{
test: /\.less$/,
use: [{
loader: 'less-loader'
}]
}
]
},
resolve: {
modules: [
"node_modules" ,
],
alias: {
'vue': 'vue/dist/vue.common.js',
"app": 'node_modules'
},
},
devServer: {
overlay: true, // immediate feedback on compiler errors -- will show an overlay on the browser
compress: true,
hot: true,
port: 9000,
headers: {
"Access-Control-Allow-Credentials": "true",
"Access-Control-Allow-Headers": "Content-Type, Authorization, x-id, Content-Length, X-Requested-With",
"Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, OPTIONS"
}
}
};
}());