vuejs / vueify

Browserify transform for single-file Vue components
MIT License
1.17k stars 152 forks source link

Babel 7.0 Support #239

Open ullmark opened 6 years ago

ullmark commented 6 years ago

This pull requests adds support for Babel 7.0. What I did was

  1. Ran npx babel-uppgrade --write
  2. Replaced mentions of babel-core and others with @babel/core
  3. Replaced env babel-preset-es2015 with @babel/preset-env as suggested in v7 upgrade manual

All tests run, and I've also tried installing the fork in a super simple test project using the following configs

.browserlistrc

Last 2 versions

.babelrc

{
  "presets": ["@babel/preset-env"]
}

Running browserify -t vueify -e src/main.js -o build/build.js produced a working output.

The @babel/runtime package had changed a bit, and couldn't require it similarly to the old codebase, but I found that it wasn't needed.

Have a look!

elliottregan commented 6 years ago

Is this Repo dead?

elliottregan commented 6 years ago

I get the error Cannot find module '@babel/runtime/helpers/interopRequireDefault'. Looks like it does need @babel/runtime. Manually installing @babel/runtime allows it to work, though.

ullmark commented 6 years ago

@elliottregan strange that you needed to manually install @babel/runtime since it is a dependency in package.json...

I've tried using the fork in a project and got no issues. I can try again to make sure no updates in other packages are causing an issue.

re. this repo being dead; I doubt it. But yeah, would be nice to get Babel 7 support in. 😄

ullmark commented 6 years ago

@elliottregan I've updated my test project with the latest dependencies, and also threw babelify into the mix but my (simple) project works fine without seeing that issue.

LostCrew commented 6 years ago

Great job @ullmark, too bad this repo looks like tumbleweeds rolling on the desert