forked from thoughtworks/build-your-own-radar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.dev.js
27 lines (24 loc) · 857 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
const { merge } = require('webpack-merge')
const common = require('./webpack.common.js')
const path = require('path')
const webpack = require('webpack')
const main = ['./src/site.js']
const fs = require('fs')
const config = require('./src/config')['development']
const featureTogglesList = Object.keys(config.featureToggles)
const scssVariables = featureTogglesList.map((x) => `$${x}:${config.featureToggles[x]};`).join('\n')
fs.writeFileSync(path.join(__dirname, './src/stylesheets/_featuretoggles.scss'), scssVariables)
// main.push('webpack-dev-server/client?http://0.0.0.0:8080')
module.exports = merge(common, {
mode: 'development',
entry: { main: main },
performance: {
hints: false,
},
plugins: [
new webpack.DefinePlugin({
'process.env.ENVIRONMENT': JSON.stringify('development'),
}),
],
devtool: 'source-map',
})