-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.dev.js
More file actions
49 lines (48 loc) · 979 Bytes
/
webpack.dev.js
File metadata and controls
49 lines (48 loc) · 979 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
'use strict';
const HtmlWebpackPlugin = require('html-webpack-plugin');
const path = require('path');
const webpack = require('webpack');
module.exports = {
mode: 'development',
context: __dirname,
entry: './examples/index.tsx',
output: {
path: path.resolve(__dirname, 'build'),
filename: 'bundle.js',
sourceMapFilename: '[file].map',
publicPath: '/'
},
module: {
rules: [
{
test: /\.tsx?$/,
exclude: /node_modules/,
loader: 'babel-loader',
options: {
cacheDirectory: true
}
}
]
},
plugins: [
new HtmlWebpackPlugin({
template: path.resolve(__dirname, 'examples/index.html'),
filename: 'index.html',
}),
],
devtool: 'eval',
devServer: {
compress: true,
port: 3000,
open: 'index.html',
client: {
overlay: true,
},
static: {
directory: '.'
}
},
resolve: {
extensions: ['.ts', '.tsx', '.js', '.jsx'],
}
}