-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathwebpack.config.js
More file actions
41 lines (38 loc) · 958 Bytes
/
webpack.config.js
File metadata and controls
41 lines (38 loc) · 958 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
const path = require('path')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const config = {
entry: './src/index.tsx',
output: {
filename: 'bundle.js',
path: path.join(__dirname, 'dist')
},
devServer: {
contentBase: path.join(__dirname, 'dist'),
publicPath: '/'
},
mode: 'development',
resolve: {
extensions: ['.tsx', '.ts', '.js', '.json']
},
module: {
rules: [
{
test: /\.(ts)x?$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
babelrc: false,
configFile: false,
presets: ['@babel/preset-env', 'solid', '@babel/preset-typescript'],
plugins: ['@babel/plugin-syntax-dynamic-import', '@babel/plugin-proposal-class-properties', '@babel/plugin-proposal-object-rest-spread'],
}
}
}
]
},
plugins: [
new HtmlWebpackPlugin()
]
}
module.exports = config