-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.dev.js
39 lines (37 loc) · 1 KB
/
webpack.dev.js
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
// eslint-disable-next-line @typescript-eslint/no-var-requires
const path = require('path');
// eslint-disable-next-line @typescript-eslint/no-var-requires
const TSConfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
module.exports = {
entry: './public/src/main.tsx',
output: {
path: path.resolve(__dirname, './public/build'),
filename: 'app.bundle.js',
},
module: {
rules: [
{
test: /^(?!.*\.spec\.tsx?$).*\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
},
{
test: /\.(scss|css)$/,
use: ['style-loader', 'css-loader', 'sass-loader'],
},
],
},
resolve: {
modules: [path.resolve(__dirname, 'src'), 'node_modules'],
plugins: [new TSConfigPathsPlugin()],
extensions: ['.ts', '.tsx', '.js'],
},
mode: 'development',
devtool: 'eval-cheap-module-source-map',
devServer: {
contentBase: path.join(__dirname, '/public/build'),
compress: true,
port: 9001,
publicPath: '/public/build',
},
};