Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions build/npm/postinstall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ async function main() {
if (process.env['CXX']) { env['CXX'] = 'g++'; }
if (process.env['CXXFLAGS']) { env['CXXFLAGS'] = ''; }
if (process.env['LDFLAGS']) { env['LDFLAGS'] = ''; }
env['npm_config_jobs'] = 'max';
setNpmrcConfig('build', env);
return npmInstallAsync('build', { env });
});
Expand All @@ -285,6 +286,34 @@ async function main() {
if (process.env['VSCODE_REMOTE_CXXFLAGS']) { env['CXXFLAGS'] = process.env['VSCODE_REMOTE_CXXFLAGS']; }
if (process.env['VSCODE_REMOTE_LDFLAGS']) { env['LDFLAGS'] = process.env['VSCODE_REMOTE_LDFLAGS']; }
if (process.env['VSCODE_REMOTE_NODE_GYP']) { env['npm_config_node_gyp'] = process.env['VSCODE_REMOTE_NODE_GYP']; }
env['npm_config_jobs'] = 'max';
setNpmrcConfig('remote', env);
return npmInstallAsync(remoteDir, { env });
});
continue;
}

if (/^(.build\/distro\/npm\/)?remote$/.test(dir)) {
const remoteDir = dir;
nativeTasks.push(() => {
const env: NodeJS.ProcessEnv = { ...process.env };
if (process.env['VSCODE_REMOTE_CC']) {
env['CC'] = process.env['VSCODE_REMOTE_CC'];
} else {
delete env['CC'];
}
if (process.env['VSCODE_REMOTE_CXX']) {
env['CXX'] = process.env['VSCODE_REMOTE_CXX'];
} else {
delete env['CXX'];
}
if (process.env['CXXFLAGS']) { delete env['CXXFLAGS']; }
if (process.env['CFLAGS']) { delete env['CFLAGS']; }
if (process.env['LDFLAGS']) { delete env['LDFLAGS']; }
if (process.env['VSCODE_REMOTE_CXXFLAGS']) { env['CXXFLAGS'] = process.env['VSCODE_REMOTE_CXXFLAGS']; }
if (process.env['VSCODE_REMOTE_LDFLAGS']) { env['LDFLAGS'] = process.env['VSCODE_REMOTE_LDFLAGS']; }
if (process.env['VSCODE_REMOTE_NODE_GYP']) { env['npm_config_node_gyp'] = process.env['VSCODE_REMOTE_NODE_GYP']; }
env['npm_config_jobs'] = 'max';
setNpmrcConfig('remote', env);
return npmInstallAsync(remoteDir, { env });
});
Expand Down
22 changes: 21 additions & 1 deletion build/rspack/rspack.serve-out.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,34 @@ export default {
output: {
path: path.join(repoRoot, '.build', 'rspack-serve-out'),
filename: 'bundled/[name].js',
chunkFilename: 'bundled/[name].js',
chunkFilename: 'bundled/[name].[contenthash].js',
assetModuleFilename: 'bundled/assets/[name][ext][query]',
publicPath: '/',
clean: true,
},
experiments: {
css: true,
},
optimization: {
moduleIds: 'deterministic',
splitChunks: {
cacheGroups: {
vendor: {
test: /[\\/]node_modules[\\/]/,
name: 'vendors',
chunks: 'all',
priority: 10,
},
common: {
name: 'common',
minChunks: 2,
chunks: 'all',
priority: 5,
reuseExistingChunk: true,
},
},
},
},
module: {
rules: [
{
Expand Down
19 changes: 14 additions & 5 deletions build/vite/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,22 +185,31 @@ export default defineConfig({
}
}
},
root: '../..', // To support /out/... paths
root: '../..',
build: {
outDir: join(__dirname, 'dist'),
minify: 'esbuild',
sourcemap: true,
rollupOptions: {
input: {
//index: path.resolve(__dirname, 'index.html'),
workbench: path.resolve(__dirname, 'workbench-vite.html'),
}
}
},
output: {
manualChunks: {
vendor: ['vscode-textmate', 'vscode-oniguruma', 'katex'],
xterm: ['@xterm/xterm', '@xterm/addon-clipboard', '@xterm/addon-search'],
},
},
},
commonjsOptions: {
include: [/node_modules/],
},
},
server: {
cors: true,
port: 5199,
fs: {
allow: [
// To allow loading from sources, not needed when loading monaco-editor from npm package
join(import.meta.dirname, '../../../')
]
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"watch-extensionsd": "deemon npm run watch-extensions",
"kill-watch-extensionsd": "deemon --kill npm run watch-extensions",
"precommit": "node --experimental-strip-types build/hygiene.ts",
"gulp": "node --max-old-space-size=8192 ./node_modules/gulp/bin/gulp.js",
"gulp": "node --max-old-space-size=16384 ./node_modules/gulp/bin/gulp.js",
"electron": "node build/lib/electron.ts",
"7z": "7z",
"update-grammars": "node build/npm/update-all-grammars.ts",
Expand Down
1 change: 1 addition & 0 deletions src/tsconfig.base.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"compilerOptions": {
"incremental": true,
"module": "nodenext",
"moduleResolution": "nodenext",
"moduleDetection": "legacy",
Expand Down
2 changes: 2 additions & 0 deletions src/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"incremental": true,
"tsBuildInfoFile": "../out/tsconfig.tsbuildinfo",
"esModuleInterop": true,
"removeComments": false,
"preserveConstEnums": true,
Expand Down