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

no bytecode loader block when use swcPlugin with bytecodePlugin #681

Open
4 tasks done
skiloop opened this issue Dec 11, 2024 · 0 comments
Open
4 tasks done

no bytecode loader block when use swcPlugin with bytecodePlugin #681

skiloop opened this issue Dec 11, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@skiloop
Copy link

skiloop commented Dec 11, 2024

Describe the bug

when use swcPlugin with bytecodePlugin (see this demo and vite config)
bytecode-loader.cjs generated but no byte code loader block in entry file.

temporary code has "'use strict';" instead of '"use strict";',
so the following replacement in bytecode plugin failed

 _code = hasBytecodeMoudle ? _code.replace(useStrict, `${useStrict}\n${bytecodeLoaderBlock}`) : _code

Electron-Vite Version

2.3.0

Electron Version

30.0.8

Vite Version

5.4.11

Validations

@alex8088 alex8088 added the bug Something isn't working label Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants