-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathwebpack.config.js
35 lines (30 loc) · 910 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
const path = require('path');
module.exports = {
mode: "development",
devtool: "inline-source-map",
entry: {
content: './src/app/content.ts',
background: './src/app/background.ts',
options: './src/ui/options.tsx',
popup: './src/ui/popup.tsx',
},
output: {
path: path.resolve(__dirname, 'dist/js'),
filename: '[name].js'
},
resolve: {
extensions: [".ts", ".tsx", ".js"]
},
module: {
rules: [
{test: /\.tsx?$/, loader: "ts-loader"},
{test: /\.css$/, use: ['style-loader', 'css-loader']},
{
test: /\.(png|jpe?g|gif|svg)$/i,
loader: 'file-loader',
options: {outputPath: '../images', esModule: false,}
},
{test: /\.md$/, use: [{loader: "html-loader"}, {loader: "markdown-loader"}]}
]
},
};