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

cannot preprocess styles on browser #28

Open
UnCor3 opened this issue Jul 20, 2024 · 0 comments
Open

cannot preprocess styles on browser #28

UnCor3 opened this issue Jul 20, 2024 · 0 comments

Comments

@UnCor3
Copy link

UnCor3 commented Jul 20, 2024

Hey, thank you everyone involved in this plugin. I ran into an issue when trying to use this on browser with polyfills

Here is what was wrong this plugin provides a property which is preprocessorOptions and it gets merged with default settings but even though i passed preprocessCustomRequire @vue/compiler-sfc was erroring out because it does not look preprocessCustomRequire in preprocessorOptions rather it looks it in options (options being the whole object passed to compileStyleAsync) so i made some changes to fix that check this pr #27 and here is how to reproduce it https://codesandbox.io/p/devbox/esbuild-plugin-vue3-browser-issue-xtfpzm

Here is the whole error in case anyone searches for this
[@vue/compiler-sfc] Style preprocessing in the browser build must provide the preprocessCustomRequire option to return the in-browser version of the preprocessor.

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

1 participant