forked from jaywink/socialhome
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
54 lines (53 loc) · 1.67 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
48
49
50
51
52
53
54
const path = require("path")
module.exports = {
entry: {
stream: path.resolve(__dirname, "socialhome/streams/app/main.js"),
},
output: {
path: path.resolve(__dirname, "socialhome/static/js"),
filename: "webpack.[name].js",
},
module: {
loaders: [
{
test: /\.js$/,
loader: "babel-loader",
include: [
path.resolve(__dirname, "socialhome"),
path.resolve(__dirname, "mocha"),
],
exclude: path.resolve(__dirname, "socialhome/static/js"),
query: {presets: ["env"]},
},
{
test: /\.scss$/,
loaders: ["css-loader", "sass-loader"],
},
{
test: /\.vue$/,
loader: "vue-loader",
options: {
loaders: {
scss: ["vue-style-loader", "css-loader", "sass-loader"],
js: "babel-loader",
},
},
},
],
},
resolve: {
modules: [
path.resolve(__dirname, "socialhome"),
path.resolve(__dirname, "node_modules"),
],
alias: {
"bootstrap-vue": "bootstrap-vue/dist/bootstrap-vue.esm.js",
"mock-socket": "mock-socket/dist/mock-socket.js",
"reconnecting-websocket": "ReconnectingWebSocket/reconnecting-websocket.min.js",
vue$: "vue/dist/vue.esm.js",
},
extensions: [".webpack.js", ".js", ".vue"],
},
stats: {colors: true},
devtool: "cheap-module-source-map",
}