What problem does this feature solve?
When using vue with a bundler such as esbuild, we need to manually configure an alias pointing from vue to vue/dist/vue.esm-bundler.js to get support for the runtime compiler. By adding a browser export condition, tool which supports conditional exports like esbuild can bundle vue with the
correct mapping automatically.
What does the proposed API look like?
No new API will be added, but some additional metadata in vue/package.json:
{
"exports": {
".": {
"browser": {
"import": "./dist/vue.esm-browser.js" // or "./dist/vue.esm-browser.prod.js", minified bundle by default
},
// ... other export conditions for "vue" entry
}
}
}
What problem does this feature solve?
When using
vuewith a bundler such asesbuild, we need to manually configure an alias pointing fromvuetovue/dist/vue.esm-bundler.jsto get support for the runtime compiler. By adding a browser export condition, tool which supports conditional exports likeesbuildcan bundlevuewith thecorrect mapping automatically.
What does the proposed API look like?
No new API will be added, but some additional metadata in
vue/package.json:{ "exports": { ".": { "browser": { "import": "./dist/vue.esm-browser.js" // or "./dist/vue.esm-browser.prod.js", minified bundle by default }, // ... other export conditions for "vue" entry } } }