1/* 2 * Copyright (C) 2022 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16const {merge} = require('webpack-merge'); 17const configCommon = require('./webpack.config.common'); 18const HtmlWebpackPlugin = require('html-webpack-plugin'); 19 20const configDev = { 21 mode: 'development', 22 entry: { 23 polyfills: './src/polyfills.ts', 24 styles: ['./src/material-theme.scss', './src/styles.css'], 25 app: './src/main_dev.ts', 26 }, 27 devtool: 'source-map', 28 plugins: [ 29 new HtmlWebpackPlugin({ 30 template: 'src/index.html', 31 inject: 'body', 32 inlineSource: '.(css|js)$', 33 }), 34 ], 35}; 36 37module.exports = merge(configCommon, configDev); 38