Skip to content

v3.0.0-alpha.0﹣"vite-plugin-monkey must be the last one of plugin list": why? #57

Answered by lisonge
Malix-Labs asked this question in Q&A
Discussion options

You must be logged in to vote

in fact, vite-plugin-monkey@v2 is also best to be the last item of the list

plugin@v2 use inlineDynamicImport and not support TopLevelAwait

graph LR;
    A(your code)-- vite build library mode -- others plugins -- vite-plugin-monkey  -->B(iife)
Loading

plugin@v3

graph LR;
    A(your code)-- vite build -- others plugins -->B(esm)
    B -- vite-plugin-monkey -- vite build library mode --> C{has TopLevelAwait\nor DynamicImport}
    C -- yes --> D(systemjs)
    C -- no --> E(iife)
Loading

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Malix-Labs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants