-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebpack.config.js
More file actions
41 lines (40 loc) · 1.02 KB
/
webpack.config.js
File metadata and controls
41 lines (40 loc) · 1.02 KB
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 MiniCssExtractPlugin = require('mini-css-extract-plugin');
module.exports = {
mode: 'development',
devtool: 'source-map',
entry: path.join(__dirname, 'src/script/main.ts'),
output: {
filename: 'bundle.js',
path: path.join(__dirname, 'public/script')
},
module: {
rules: [
{
test: /\.tsx?$/,
loader: 'ts-loader',
exclude: /node_modules/,
},
{
test: /\.scss$/,
use: [MiniCssExtractPlugin.loader,
{
loader: 'css-loader',
options: {
url: false
}
},
'sass-loader'
],
}
]
},
resolve: {
extensions: [".tsx", ".ts", ".js"]
},
plugins: [
new MiniCssExtractPlugin({
filename: '../css/[name].css'
})
]
};