forked from Zettlr/Zettlr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.main.config.js
30 lines (29 loc) · 1.21 KB
/
webpack.main.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
const CopyWebpackPlugin = require('copy-webpack-plugin')
module.exports = {
// Main entry point: the file that runs in the main process
entry: './source/main.ts',
module: {
rules: require('./webpack.rules')
},
plugins: [
new CopyWebpackPlugin({
patterns: [
{ from: 'source/main/assets/tutorial', to: 'tutorial' },
{ from: 'source/main/assets/dict', to: 'dict' },
{ from: 'source/common/lang', to: 'lang' },
{ from: 'source/app/service-providers/assets/csl-locales', to: 'assets/csl-locales' },
{ from: 'source/app/service-providers/assets/csl-styles', to: 'assets/csl-styles' },
{ from: 'source/main/modules/export/assets/export.tpl.htm', to: 'assets' },
{ from: 'source/main/modules/export/assets/template.revealjs.htm', to: 'assets' },
{ from: 'source/main/modules/export/assets/revealjs-styles', to: 'assets/revealjs-styles' }
]
})
],
resolve: {
extensions: [ '.js', '.ts', '.jsx', '.tsx', '.css', '.json' ]
},
externals: {
// Do not embed fsevents (otherwise this leads to problems on Linux and Windows, see https://github.com/paulmillr/chokidar/issues/618#issuecomment-392618390)
'fsevents': "require('fsevents')"
}
}