Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.

Update dependencies & test for React hooks #123

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

akxcv
Copy link
Owner

@akxcv akxcv commented Aug 11, 2020

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.

@akxcv akxcv self-assigned this Aug 11, 2020
@mmaietta
Copy link

It would be fantastic to have this merged! 🙂

@harshlele
Copy link

harshlele commented Mar 1, 2021

a lot of people now use react hooks and function components, it would be nice if it worked with vuera! @akxcv

@mmaietta
Copy link

mmaietta commented Mar 1, 2021

Hmmm the build checks are passing but I'm unable to locally build the project locally in my checkout of the fix branch.

@willisplummer
Copy link

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.

@Halu95
Copy link

Halu95 commented Jun 26, 2021

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...

@echo008 echo008 mentioned this pull request Jul 1, 2021
@thqueiroz
Copy link

thqueiroz commented Dec 16, 2022

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"] }, }, }

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants