forked from banacorn/agda-mode-vscode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
46 lines (45 loc) · 1.46 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
38
39
40
41
42
43
44
45
46
const path = require('path');
const CopyPlugin = require('copy-webpack-plugin');
module.exports = [
{
target: "node",
entry: './lib/js/src/View/Root.bs.js',
output: {
path: path.join(__dirname, 'dist'),
filename: 'bundled-view.js',
libraryTarget: 'window',
},
devtool: 'source-map',
externals: {
vscode: 'vscode' // the vscode-module is created on-the-fly and must be excluded. Add other modules that cannot be webpack'ed, 📖 -> https://webpack.js.org/configuration/externals/
},
module: {
rules: [
{
test: /\.less$/,
loader: 'less-loader', // compiles Less to CSS
},
],
},
plugins: [
new CopyPlugin({
patterns: [
{ from: 'asset/codicon', to: 'codicon' },
],
}),
],
},
{
target: "node",
entry: './lib/js/src/Main.bs.js',
output: {
path: path.join(__dirname, 'dist'),
filename: 'app.bundle.js',
libraryTarget: 'commonjs2',
},
devtool: 'source-map',
externals: {
vscode: 'commonjs vscode' // the vscode-module is created on-the-fly and must be excluded. Add other modules that cannot be webpack'ed, 📖 -> https://webpack.js.org/configuration/externals/
}
}
];