mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 20:52:56 +01:00
Ship ESM; Adopt latest deps
This commit is contained in:
parent
524db65880
commit
64d2e8c8ef
13 changed files with 8919 additions and 25 deletions
28
scripts/webpack.js
Normal file
28
scripts/webpack.js
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
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',
|
||||
"cssMode": './release/esm/cssMode',
|
||||
"cssWorker": './release/esm/cssWorker'
|
||||
},
|
||||
output: {
|
||||
filename: '[name].js',
|
||||
path: path.resolve(REPO_ROOT, targetFolder),
|
||||
libraryTarget: "amd"
|
||||
},
|
||||
mode: mode,
|
||||
plugins: [
|
||||
new webpack.optimize.LimitChunkCountPlugin({
|
||||
maxChunks: 1,
|
||||
})
|
||||
],
|
||||
};
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue