-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.test.js
29 lines (26 loc) · 907 Bytes
/
webpack.test.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
const path = require('path');
const merge = require('webpack-merge');
const Dotenv = require('dotenv-webpack');
const common = require('./webpack.common.js');
module.exports = merge(common, {
mode: 'development',
devtool: 'eval-source-map',
devServer: {
compress: true,
contentBase: path.join(__dirname, 'public'),
historyApiFallback: true,
},
optimization: {
namedModules: true,
noEmitOnErrors: true,
usedExports: true,
},
plugins: [
new Dotenv({
path: path.resolve(__dirname, './.env.development'), // load this now instead of the ones in '.env'
safe: true, // load '.env.example' to verify the '.env' variables are all set. Can also be a string to a different file.
systemvars: true, // load all the predefined 'process.env' variables which will trump anything local per dotenv specs.
silent: true, // hide any errors
}),
],
});