process . env . NODE_ENV = 'development' ; import webpack from 'webpack' ; import merge from 'webpack-merge' ; import HtmlWebpackPlugin from 'html-webpack-plugin' ; import baseConfig from './webpack.base' ; import { resolveByRootDir , DIST } from '../script/util' ; const config = { mode : 'development' , devtool : 'inline-source-map' , output : { path : resolveByRootDir ( DIST ) , filename : '[name].[hash].js' , publicPath : '/' , } , module : { rules : [ { test : /\.s?css$/ , use : [ { loader : 'style-loader' , options : { hmr : true , sourceMap : true , } , } , { loader : 'typings-for-css-modules-loader' , options : { minimize : false , importLoaders : 2 , modules : true , sourceMap : true , namedExport : true , camelCase : true , localIdentName : '[local]' , banner : '//This file is automatically generated by typings-for-css-modules.\n// Please do not change this file!' , } , } , { loader : 'postcss-loader' , options : { sourceMap : true , } , } , { loader : 'sass-loader' , options : { sourceMap : true , } , } , ] , } , ] , } , plugins : [ new HtmlWebpackPlugin ( { template : 'template.html' , filename : 'index.html' , } ) , new webpack . NamedModulesPlugin ( ) , new webpack . HotModuleReplacementPlugin ( ) , new webpack . WatchIgnorePlugin ( [ /scss\.d\.ts/ ] ) , ] , } ; export default merge ( baseConfig , config ) ;