forked from italia/developers.italia.it
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.dev.js
More file actions
24 lines (22 loc) · 680 Bytes
/
Copy pathwebpack.dev.js
File metadata and controls
24 lines (22 loc) · 680 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
const { merge } = require('webpack-merge');
const common = require('./webpack.common.js');
module.exports = merge(common, {
mode: 'development',
devtool: 'inline-source-map',
devServer: {
headers: {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, PATCH, OPTIONS",
"Access-Control-Allow-Headers": "X-Requested-With, content-type, Authorization"
},
static: {
directory: './dist',
},
// Write files from CopyWebpackPlugin to disk even in
// development mode.
// We need this because they are referenced in the HTML.
devMiddleware: {
writeToDisk: true,
},
},
});