Skip to content

Commit

Permalink
Remove shakeFailPaths
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Dec 19, 2024
1 parent 4c48739 commit 733203f
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions extensions/vscode/scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,6 @@ const path = require('path');
const fs = require('fs');
const treeShake = require('@kermanx/tree-shaker').treeShake;
const minify = process.argv.includes('--minify');
const shakeFailPaths = [
'/request-light/lib/node/main.js',
'/@vue/compiler-core/dist/compiler-core.cjs.prod.js',
'/packages/typescript-plugin/lib/requests/componentInfos.js',
'/volar-service-typescript/lib/plugins/docCommentTemplate.js',
'/@volar/language-service/lib/features/provideHover.js',
'/volar-service-typescript/lib/utils/previewer.js',
'/@babel/parser/lib/index.js',
'/@vscode/emmet-helper/lib/cjs/emmetHelper.js',
'/vscode-json-languageservice/lib/esm/services/jsonHover.js',
];

require('esbuild').context({
entryPoints: {
Expand Down Expand Up @@ -99,9 +88,6 @@ require('esbuild').context({
}
build.onLoad({ filter: /\.js/ }, ({ path }) => {
path = path.replace(/\\/g, '/');
if (shakeFailPaths.some(name => path.endsWith(name))) {
return;
}
const soruce = fs.readFileSync(path, 'utf-8');
const { output, diagnostics } = treeShake(soruce, 'recommended', false);
if (!diagnostics.length) {
Expand Down

0 comments on commit 733203f

Please sign in to comment.