forked from CoEDL/nabu-collection-viewer-v1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.deploy.testing.js
46 lines (44 loc) · 1.23 KB
/
webpack.deploy.testing.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
"use strict";
const path = require("path");
const webpack = require("webpack");
const merge = require("webpack-merge");
const common = require("./webpack.common.js");
const CleanWebpackPlugin = require("clean-webpack-plugin");
module.exports = merge(common, {
devtool: "none",
mode: "production",
output: {
publicPath: "/test-viewer/"
},
plugins: [
new CleanWebpackPlugin(["dist/"], {
watch: true,
root: __dirname
}),
new webpack.DefinePlugin({
"process.env.NODE_ENV": JSON.stringify("production"),
"process.env.MODE": JSON.stringify("online")
})
],
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: [
{
loader: "ifdef-loader",
options: {
DEPLOY_TESTING: true,
DEPLOY_PRODUCTION: false
}
},
{
loader: "babel-loader",
options: { presets: "env" }
}
]
}
]
}
});