mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 13:55:41 +01:00
29 lines
No EOL
679 B
JavaScript
29 lines
No EOL
679 B
JavaScript
const path = require('path');
|
|
const webpack = require('webpack');
|
|
|
|
const REPO_ROOT = path.resolve(__dirname, '..');
|
|
|
|
exports.createWebpackConfig = function (isDev) {
|
|
let targetFolder = isDev ? './release/dev' : './release/min';
|
|
let mode = isDev ? 'development' : 'production';
|
|
|
|
return {
|
|
entry: {
|
|
"monaco.contribution": './release/esm/monaco.contribution',
|
|
"jsonMode": './release/esm/jsonMode',
|
|
"jsonWorker": './release/esm/jsonWorker'
|
|
},
|
|
output: {
|
|
filename: '[name].js',
|
|
path: path.resolve(REPO_ROOT, targetFolder),
|
|
libraryTarget: "amd"
|
|
},
|
|
mode: mode,
|
|
plugins: [
|
|
new webpack.optimize.LimitChunkCountPlugin({
|
|
maxChunks: 1,
|
|
})
|
|
],
|
|
};
|
|
|
|
} |