Skip to content

Commit 4556bcd

Browse files
authored
Add option to copy trash dependency to bundle (#13112)
1 parent 1943c80 commit 4556bcd

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

dev-packages/application-manager/src/generator/webpack-generator.ts

+1
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,7 @@ if (process.platform !== 'win32') {
393393
394394
const nativePlugin = new NativeWebpackPlugin({
395395
out: 'native',
396+
trash: ${this.ifPackage('@theia/filesystem', 'true', 'false')},
396397
ripgrep: ${this.ifPackage(['@theia/search-in-workspace', '@theia/file-search'], 'true', 'false')},
397398
pty: ${this.ifPackage('@theia/process', 'true', 'false')},
398399
nativeBindings: {

dev-packages/native-webpack-plugin/src/native-webpack-plugin.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ const REQUIRE_KEYMAPPING = './build/Release/keymapping';
2727

2828
export interface NativeWebpackPluginOptions {
2929
out: string;
30+
trash: boolean;
3031
ripgrep: boolean;
3132
pty: boolean;
3233
replacements?: Record<string, string>;
@@ -95,7 +96,9 @@ export class NativeWebpackPlugin {
9596
}
9697
);
9798
compiler.hooks.afterEmit.tapPromise(NativeWebpackPlugin.name, async () => {
98-
await this.copyTrashHelper(compiler);
99+
if (this.options.trash) {
100+
await this.copyTrashHelper(compiler);
101+
}
99102
if (this.options.ripgrep) {
100103
await this.copyRipgrep(compiler);
101104
}

0 commit comments

Comments
 (0)