Skip to content

Commit

Permalink
Add option to copy trash dependency to bundle (#13112)
Browse files Browse the repository at this point in the history
  • Loading branch information
msujew authored Nov 30, 2023
1 parent 1943c80 commit 4556bcd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ if (process.platform !== 'win32') {
const nativePlugin = new NativeWebpackPlugin({
out: 'native',
trash: ${this.ifPackage('@theia/filesystem', 'true', 'false')},
ripgrep: ${this.ifPackage(['@theia/search-in-workspace', '@theia/file-search'], 'true', 'false')},
pty: ${this.ifPackage('@theia/process', 'true', 'false')},
nativeBindings: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const REQUIRE_KEYMAPPING = './build/Release/keymapping';

export interface NativeWebpackPluginOptions {
out: string;
trash: boolean;
ripgrep: boolean;
pty: boolean;
replacements?: Record<string, string>;
Expand Down Expand Up @@ -95,7 +96,9 @@ export class NativeWebpackPlugin {
}
);
compiler.hooks.afterEmit.tapPromise(NativeWebpackPlugin.name, async () => {
await this.copyTrashHelper(compiler);
if (this.options.trash) {
await this.copyTrashHelper(compiler);
}
if (this.options.ripgrep) {
await this.copyRipgrep(compiler);
}
Expand Down

0 comments on commit 4556bcd

Please sign in to comment.