-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.dev.js
36 lines (30 loc) · 978 Bytes
/
webpack.dev.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
/* global require module */
const templatesDir = 'assets';
const WebpackMerge = require('webpack-merge');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const commonConfig = require('./webpack.common.js');
const config = require('./web/config');
const { getProcessedAppDomain } = require('./assets/common');
const html = new HtmlWebpackPlugin({
template: `${templatesDir}/index.ejs`,
templateParameters: {
viewportTag: config.viewportTag,
name: config.friendlyName,
title: `[DEBUG] ${config.friendlyName}: ${config.description}`,
description: config.description,
type: config.type,
appDomain: getProcessedAppDomain(config),
baseUrl: `${getProcessedAppDomain(config)}/${config.staticPath}/`
},
filename: 'index.html',
chunks: ['app']
});
module.exports = WebpackMerge(
commonConfig,
{
devtool: 'inline-source-map',
plugins: [
html
]
}
);