-
Notifications
You must be signed in to change notification settings - Fork 4
/
webpack.judge.js
38 lines (37 loc) · 993 Bytes
/
webpack.judge.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
const webpack = require("webpack");
const path = require("path");
const nodeExternals = require("webpack-node-externals");
module.exports = {
devtool: "sourcemap",
// entry point of our application
entry: ["./judge/watch.js"],
// where to place the compiled bundle
output: {
path: path.join(__dirname, "build"),
filename: "judge.bundle.js"
},
target: "node",
module: {
// `loaders` is an array of loaders to use.
// here we are only configuring vue-loader
loaders: [
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
loader: "babel-loader",
options: {
presets: ["es2015", "es2016", "es2017", "stage-3"],
plugins: ["transform-runtime"]
}
}
]
},
plugins: [
new webpack.BannerPlugin({ banner: 'require("source-map-support").install();', raw: true, entryOnly: false })
],
externals: [nodeExternals()],
node: {
__filename: true,
__dirname: true
}
};