fix(bridge): add additional vue composition-api resolutions (#614)

This commit is contained in:
Daniel Roe 2021-10-02 12:47:58 +01:00 committed by GitHub
parent 40d3aae439
commit a2da8a0a83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,7 +13,13 @@ export function setupCAPIBridge (_options: any) {
}
// Add composition-api support
nuxt.options.alias['@vue/composition-api'] = require.resolve('@vue/composition-api/dist/vue-composition-api.mjs')
const vueCapiEntry = require.resolve('@vue/composition-api/dist/vue-composition-api.mjs')
nuxt.options.alias['@vue/composition-api/dist/vue-composition-api.common.js'] = vueCapiEntry
nuxt.options.alias['@vue/composition-api/dist/vue-composition-api.common.prod.js'] = vueCapiEntry
nuxt.options.alias['@vue/composition-api/dist/vue-composition-api.esm.js'] = vueCapiEntry
nuxt.options.alias['@vue/composition-api/dist/vue-composition-api.js'] = vueCapiEntry
nuxt.options.alias['@vue/composition-api/dist/vue-composition-api.mjs'] = vueCapiEntry
nuxt.options.alias['@vue/composition-api'] = vueCapiEntry
const capiPluginPath = resolve(distDir, 'runtime/capi.plugin.mjs')
addPluginTemplate({ filename: 'capi.plugin.mjs', src: capiPluginPath })