-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
38 lines (35 loc) · 1005 Bytes
/
webpack.config.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
const path = require('path');
const environment = process.env.NODE_ENV || 'dev';
const devtool = environment === 'dev' ? 'inline-source-map' : undefined;
const outputPath = path.resolve(__dirname, 'build');
module.exports = {
entry: {
background: [path.resolve(__dirname, 'src/background.ts')],
options: [path.resolve(__dirname, 'src/options.tsx')],
contentScripts: [path.resolve(__dirname, 'src/contentScripts.tsx')],
},
output: {
path: outputPath,
publicPath: '/',
},
module: {
rules: [
{
test: /\.s[ac]ss$/i,
use: ['style-loader', 'css-loader', 'sass-loader'],
},
{
test: /.tsx?$/i,
use: [
{
loader: 'ts-loader',
},
],
},
],
},
resolve: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
devtool: devtool,
};