forked from asseinfo/react-kanban
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.dev.js
36 lines (35 loc) · 1021 Bytes
/
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
const path = require('path')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
module.exports = {
mode: 'development',
entry: './assets/index.js',
output: {
filename: 'index.js',
path: path.resolve(__dirname, 'dist')
},
module: {
rules: [
{ test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader' },
{ test: /\.ts$/, exclude: /node_modules/, use: 'ts-loader' },
{
test: /\.scss$/,
use: [MiniCssExtractPlugin.loader, 'css-loader', 'sass-loader']
}
]
},
plugins: [new MiniCssExtractPlugin(), new HtmlWebpackPlugin({ template: './assets/index.html' })],
resolve: {
alias: {
'@services': path.resolve(__dirname, 'src/services/'),
'@components': path.resolve(__dirname, 'src/components/')
},
extensions: ['.ts', '.js', '.json', '.scss']
},
devtool: 'inline-source-map',
devServer: {
watchOptions: {
ignored: /node_modules/
}
}
}