babel-plugin-transform-vue-jsx icon indicating copy to clipboard operation
babel-plugin-transform-vue-jsx copied to clipboard

default export from babel-helper-vue-jsx-merge-props

Open quinnlangille opened this issue 7 years ago • 4 comments

I'm not sure if this is an issue for babel-helper-vue-jsx-merge-props or for here, but in the current version of vue-jsx we're adding a default import as import _mergeJSXProps from 'babel-helper-vue-jsx-merge-props'.

However, it doesn't seem that babel-helper-vue-jsx-merge-props has a default export. It's currently causing an error in my build. I can submit a PR with my fix, but I'm not sure what side effects it would have.

If you think it will be harmless to the vue-babel ecosystem then lemme know and I'll push it up :octocat:

quinnlangille avatar Aug 30 '18 13:08 quinnlangille

@quinnlangille hi how you resolved?

enjkvbej avatar Jun 24 '21 15:06 enjkvbej

I'm not sure if this is an issue for babel-helper-vue-jsx-merge-props or for here, but in the current version of vue-jsx we're adding a default import as import _mergeJSXProps from 'babel-helper-vue-jsx-merge-props'.

However, it doesn't seem that babel-helper-vue-jsx-merge-props has a default export. It's currently causing an error in my build. I can submit a PR with my fix, but I'm not sure what side effects it would have.

If you think it will be harmless to the vue-babel ecosystem then lemme know and I'll push it up :octocat:

@quinnlangille hi how you resolved?

pecliu avatar Oct 25 '21 14:10 pecliu

when I use vite & vue2.x & jsx, there came out this error

uncaught SyntaxError: The requested module '/node_modules/@vue/babel-helper-vue-jsx-merge-props/dist/helper.js?v=a5e8dfdf' does not provide an export named 'default'

pecliu avatar Oct 25 '21 14:10 pecliu

Hey @pecliu, this was for an old PoC repo I was working on. I don't remember the exact fix, but I know I had to fork a bunch of packages and manually resolve their dependencies to get them to build. Here's the project if you want to take a look -> https://github.com/SSENSE/flip, if you check inside src/utils there are a few packages I've cloned and modified to get around the build error.

Not very helpful if you need to ship to production lol but if you're working locally that should +/- work

quinnlangille avatar Oct 25 '21 15:10 quinnlangille