Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile Error #42

Closed
jgrauel opened this issue Oct 31, 2021 · 1 comment
Closed

Compile Error #42

jgrauel opened this issue Oct 31, 2021 · 1 comment

Comments

@jgrauel
Copy link

jgrauel commented Oct 31, 2021

I am getting the following error when attempting to compile our code
ERROR in ../node_modules/@vueuse/head/dist/index.mjs 349:27-42 Can't import the named export 'defineComponent' from non EcmaScript module (only default export is available)

I followed the readme instructions for npm install and then the standard import of the code.
import { createHead } from '@vueuse/head'

"@vueuse/head": "^0.6.0"
"webpack": "^4.46.0"

running Node: v14.17.1

Thanks!

@jgrauel
Copy link
Author

jgrauel commented Nov 1, 2021

I found this suggestion in vueuse/vueuse#718
which when added to the my webpack configuration did resolve the issue.

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

@jgrauel jgrauel closed this as completed Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant