Skip to content

cannot preprocess styles on browser #28

Open
@uncor3

Description

@uncor3

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions