mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 16:15:41 +01:00
Avoid going through separate package.json files
This commit is contained in:
parent
d2e1d5104f
commit
aa5bb2cfa7
13 changed files with 38 additions and 30 deletions
|
|
@ -178,13 +178,14 @@ exports.build = build;
|
|||
|
||||
/**
|
||||
* @param {{
|
||||
* base: string;
|
||||
* entryPoints: string[];
|
||||
* external: string[];
|
||||
* }} options
|
||||
*/
|
||||
function buildESM(options) {
|
||||
build({
|
||||
entryPoints: options.entryPoints,
|
||||
entryPoints: options.entryPoints.map(e => (`${options.base}/${e}`)),
|
||||
bundle: true,
|
||||
target: 'esnext',
|
||||
format: 'esm',
|
||||
|
|
@ -192,8 +193,8 @@ function buildESM(options) {
|
|||
AMD: 'false'
|
||||
},
|
||||
external: options.external,
|
||||
outbase: 'src',
|
||||
outdir: 'release/esm/',
|
||||
outbase: `${options.base}/src`,
|
||||
outdir: `${options.base}/release/esm/`,
|
||||
plugins: [
|
||||
alias({
|
||||
'vscode-nls': path.join(__dirname, 'fillers/vscode-nls.ts')
|
||||
|
|
@ -206,6 +207,7 @@ exports.buildESM = buildESM;
|
|||
/**
|
||||
* @param {'dev'|'min'} type
|
||||
* @param {{
|
||||
* base: string;
|
||||
* entryPoint: string;
|
||||
* banner: string;
|
||||
* }} options
|
||||
|
|
@ -213,7 +215,7 @@ exports.buildESM = buildESM;
|
|||
function buildOneAMD(type, options) {
|
||||
/** @type {import('esbuild').BuildOptions} */
|
||||
const opts = {
|
||||
entryPoints: [options.entryPoint],
|
||||
entryPoints: [`${options.base}/${options.entryPoint}`],
|
||||
bundle: true,
|
||||
target: 'esnext',
|
||||
format: 'iife',
|
||||
|
|
@ -227,8 +229,8 @@ function buildOneAMD(type, options) {
|
|||
footer: {
|
||||
js: 'return moduleExports;\n});'
|
||||
},
|
||||
outbase: 'src',
|
||||
outdir: `release/${type}/`,
|
||||
outbase: `${options.base}/src`,
|
||||
outdir: `${options.base}/release/${type}/`,
|
||||
plugins: [
|
||||
alias({
|
||||
'vscode-nls': path.join(__dirname, '../build/fillers/vscode-nls.ts'),
|
||||
|
|
@ -244,6 +246,7 @@ function buildOneAMD(type, options) {
|
|||
|
||||
/**
|
||||
* @param {{
|
||||
* base: string;
|
||||
* entryPoint: string;
|
||||
* banner: string;
|
||||
* }} options
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue