-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.dev.js
More file actions
28 lines (27 loc) · 836 Bytes
/
webpack.dev.js
File metadata and controls
28 lines (27 loc) · 836 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
25
26
27
28
// eslint-disable-next-line import/no-extraneous-dependencies
const HtmlWebpackPlugin = require('html-webpack-plugin');
// eslint-disable-next-line import/no-extraneous-dependencies
const HtmlWebpackRootPlugin = require('html-webpack-root-plugin');
// eslint-disable-next-line import/no-extraneous-dependencies
const webpack = require('webpack');
const path = require('path');
module.exports = {
mode: 'development',
entry: './src/index.dev.js',
devtool: 'inline-source-map',
plugins: [
new HtmlWebpackPlugin({
title: 'Development',
}),
new HtmlWebpackRootPlugin(),
new webpack.DefinePlugin({
__GOOGLE_API_KEY__: JSON.stringify(process.env.GOOGLE_API_KEY)
})
],
devServer: {
contentBase: path.join(__dirname, 'dist'),
compress: true,
port: 9000,
injectClient: false
},
};