generated from fregante/browser-extension-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
37 lines (36 loc) · 1.13 KB
/
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
const CopyPlugin = require('copy-webpack-plugin')
module.exports = (env, options) => ({
devtool: options.mode === 'development' ? 'inline-source-map' : false,
stats: 'minimal',
resolve: {
extensions: ['.ts', '.js']
},
entry: {
download_preview_content_script: './source/download_preview/content_script',
editor_inject_inline_scripts_content_script: './source/editor_inject_inline_scripts/content_script',
editor_sync_codemirror_with_dom_inline_script: './source/editor_sync_codemirror_with_dom/inline_script',
editor_add_attributes_form_inline_script: './source/editor_add_attributes_form/inline_script',
editor_live_preview_content_script: './source/editor_live_preview/content_script'
},
output: {
publicPath: '/dist/',
clean: true
},
module: {
rules: [
{ test: /\.ts$/, loader: 'ts-loader' },
{ test: /\.html$/, loader: 'html-loader' }
]
},
plugins: [
new CopyPlugin({
patterns: [
{ from: 'static' },
{ from: 'node_modules/webextension-polyfill/dist/browser-polyfill.min.js' }
]
})
],
watchOptions: {
ignored: '**/node_modules'
}
})