Skip to content

Commit

Permalink
chore(vscode): remove esbuild-plugin-copy
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Nov 6, 2024
1 parent 6c8d41d commit 44f309b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 265 deletions.
1 change: 0 additions & 1 deletion extensions/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,6 @@
"@vue/language-server": "2.1.10",
"@vue/typescript-plugin": "2.1.10",
"esbuild": "latest",
"esbuild-plugin-copy": "latest",
"esbuild-visualizer": "latest",
"reactive-vscode": "0.2.7-beta.1",
"semver": "^7.5.4",
Expand Down
23 changes: 14 additions & 9 deletions extensions/vscode/scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,20 @@ require('esbuild').context({
})
},
},
require('esbuild-plugin-copy').copy({
resolveFrom: 'cwd',
assets: {
from: ['./node_modules/@vue/language-core/schemas/**/*'],
to: ['./dist/schemas'],
{
name: 'schemas',
setup(build) {
build.onEnd(() => {
if (!fs.existsSync(path.resolve(__dirname, '../dist/schemas'))) {
fs.mkdirSync(path.resolve(__dirname, '../dist/schemas'));
}
fs.cpSync(
path.resolve(__dirname, '../node_modules/@vue/language-core/schemas/vue-tsconfig.schema.json'),
path.resolve(__dirname, '../dist/schemas/vue-tsconfig.schema.json'),
);
});
},
// @ts-expect-error
keepStructure: true,
}),
},
{
name: 'meta',
setup(build) {
Expand All @@ -62,4 +67,4 @@ require('esbuild').context({
await ctx.dispose();
console.log('finished.');
}
})
});
Loading

0 comments on commit 44f309b

Please sign in to comment.