Open akxcv opened 4 years ago
It would be fantastic to have this merged! 🙂
a lot of people now use react hooks and function components, it would be nice if it worked with vuera! @akxcv
Hmmm the build checks are passing but I'm unable to locally build the project locally in my checkout of the fix branch.
i'm getting local build issues with this branch too:
➜ vuera git:(updates-and-hooks) yarn build
yarn run v1.22.10
$ cross-env BABEL_ENV=rollup rollup -c
src/index.js → dist/vuera.cjs.js...
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
[!] (plugin babel) Error: /Users/willisplummer/code/wavepaths/vuera/src/index.js: Babel 7.0.0-beta.56 has dropped support for the 'helpersNamespace' utility.If you are using @babel/plugin-external-helpers you will need to use a newer version than the one you currently have installed. If you have your own implementation, you'll want to explore using 'helperGenerator' alongside 'file.availableHelper()'.
src/index.js
Error: /Users/willisplummer/code/wavepaths/vuera/src/index.js: Babel 7.0.0-beta.56 has dropped support for the 'helpersNamespace' utility.If you are using @babel/plugin-external-helpers you will need to use a newer version than the one you currently have installed. If you have your own implementation, you'll want to explore using 'helperGenerator' alongside 'file.availableHelper()'.
at File.set (/Users/willisplummer/code/wavepaths/vuera/node_modules/@babel/core/lib/transformation/file/file.js:137:13)
at PluginPass.pre (/Users/willisplummer/code/wavepaths/vuera/node_modules/babel-plugin-external-helpers/lib/index.js:10:12)
at transformFile (/Users/willisplummer/code/wavepaths/vuera/node_modules/@babel/core/lib/transformation/index.js:96:27)
at transformFile.next (<anonymous>)
at run (/Users/willisplummer/code/wavepaths/vuera/node_modules/@babel/core/lib/transformation/index.js:35:12)
at run.next (<anonymous>)
at Object.transform (/Users/willisplummer/code/wavepaths/vuera/node_modules/@babel/core/lib/transform.js:27:41)
at transform.next (<anonymous>)
at evaluateSync (/Users/willisplummer/code/wavepaths/vuera/node_modules/gensync/index.js:244:28)
at Object.sync (/Users/willisplummer/code/wavepaths/vuera/node_modules/gensync/index.js:84:14)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Hey @akxcv, using "@babel/plugin-external-helpers" instead of "babel-plugin-external-helpers" and adjusting the rollup plugin entry in the .babelrc file to "@babel/external-helpers" seems to have resolved the build issue for me at least, hope it helps...
Hey, @Halu95 ! Can you please explain how you make it works? I am having the same problem but no solution that I saw until now worked for me. my
my babel.config.js:
module.exports = { presets: [ [ "@babel/preset-env", { es2015: { modules: false }, modules: false }, ], "@babel/preset-react" ], plugins: [ "@babel/plugin-proposal-object-rest-spread", "@babel/plugin-proposal-class-properties", "@babel/plugin-transform-runtime" ], env: { rollup: { plugins: ["@babel/external-helpers"] }, }, }
A lot of development dependencies, such as Babel, were way outdated.
I am also trying to reproduce issues with React hooks, as described in #101 and #122.