Skip to content

v1.3.0

Compare
Choose a tag to compare
@github-actions github-actions released this 28 Oct 14:52
· 77 commits to main since this release

Notable Changes

The module field now points to the .mjs version build instead of .esm.js for better native ESM support and future-proofing.

Troubleshooting

.mjs can't resolve on Webpack 4

vueuse/vueuse#718

Nuxt
// nuxt.config.js

module.exports = {
  build: {
    extend (config) {
      config.module.rules.push({
        test: /\.mjs$/,
        include: /node_modules/,
        type: "javascript/auto"
      })
    }
  }
}
Vue CLI
// vue.config.js

module.exports = {
  configureWebpack: {
    module: {
      rules: [{
        test: /\.mjs$/,
        include: /node_modules/,
        type: "javascript/auto"
      }]
    }
  }
}

[vue-composition-api] must call Vue.use(VueCompositionAPI) before using any function

Make share you have only one version of @vue/composition-api installed and resolved to the same version.

Vite

vueuse/vue-demi#106 (comment)

resolve: {
  alias: [
    { find: /^@vue\/composition-api$/, replacement: '@vue/composition-api/dist/vue-composition-api.mjs' },
  ]
}
Webpack
resolve: {
  alias: [
    '@vue/composition-api$': '@vue/composition-api/dist/vue-composition-api.mjs'
  ]
}

Bug Fixes