bytenode-webpack-plugin icon indicating copy to clipboard operation
bytenode-webpack-plugin copied to clipboard

Can I exclude some files?

Open Cinux-Chosan opened this issue 3 years ago • 1 comments

Because of some known issues of bytenode, I need to exclude some files to be compiled into jsc, But there seems no option for this?

Cinux-Chosan avatar Oct 26 '21 05:10 Cinux-Chosan

@Cinux-Chosan correct, there is no option for it at the moment. I plan to add include and exclude options, but I haven't had the time yet. Feel free to open a pull request if you want to tackle this!

herberttn avatar Oct 27 '21 14:10 herberttn

@Cinux-Chosan Try v2.2.0

herberttn avatar Nov 03 '22 18:11 herberttn

Is there no way to prevent a file from being modified by the plugin? I know that it currently generates a compiled.js file, but is it possible to leave the file as it was before the build process?

I have an Electron app, and it includes a small preload.ts file that exposes ipcRenderer in the Window context. The issue is that now preload.js has been modified to include code that imports the compiled file to execute it, which I don't think is possible in the browser context.

Capture d’écran 2023-07-13 à 00 10 29 Capture d’écran 2023-07-13 à 00 11 09

The error and the files i'm getting on build.

Atomoox avatar Jul 12 '23 22:07 Atomoox

@Atomoox can you try using the exclude option? https://github.com/herberttn/bytenode-webpack-plugin/blob/1b8d19be49f083c9dc83bfd11c9b3eed1035d989/src/types.ts#L12

If it doesn't work for you, please file a new issue with a reproduction repository for me to try.

herberttn avatar Jul 14 '23 18:07 herberttn