Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: be able to bundle preload script #31

Closed
johnheroy opened this issue Nov 2, 2022 · 2 comments
Closed

feature request: be able to bundle preload script #31

johnheroy opened this issue Nov 2, 2022 · 2 comments

Comments

@johnheroy
Copy link

For security reasons, require is not defined in the special context in which preload scripts run, but it would be useful for preload scripts to be able to share constants (i.e., method names) between preload scripts and IPC implementations for the APIs exposed in preload scripts.

This feature request is to suggest being able to build the preload scripts with esbuild --bundle option so there is no need for require at runtime.

@caoxiemeihao
Copy link
Owner

caoxiemeihao commented Nov 2, 2022

vite-electron-plugin pursues build performance.
vite-plugin-electron will be bundle Preload-scripts.

Not sure if adding --bundle is worth it :)

@caoxiemeihao
Copy link
Owner

More about vite-plugin-electron
electron-vite/vite-plugin-electron#107

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants