Giter Club home page Giter Club logo

Comments (3)

krewllobster avatar krewllobster commented on May 28, 2024 1

Hi there,

It turned out to be a Jest/Create-react-app issue. I was able to resolve by changing my test command from:

"react-app-rewired test"

to:

"react-app-rewired test --transformIgnorePatterns \"node_modules/(?!(grommet-controls))/\""

Jest assumes that all installed packages in node_modules has been transpiled to ES5, and if they aren't (which grommet-controls is not -- i.e. it does not have a dist folder containing transpiled exports) they need to be exempted from the default ignore pattern of "node_modules".

I by no means know 100% of what I'm talking about, but it appears that grommet-controls has a rollup config that would do the transpilation and put it in a "dist" folder. If you were to upload the package with a dist folder and with the module exports pointing to it, then this would not happen. For example, if you look at the index of the 'grommet' module, it is pointing to the components folder which is comprised of transpiled es5 code.

Either way, I've resolved on my end! Thanks.

from grommet-controls.

atanasster avatar atanasster commented on May 28, 2024

Hi - I am not sure about the error, but I think you are not using the named imports :

import { Tag } from 'grommet-controls'

from grommet-controls.

atanasster avatar atanasster commented on May 28, 2024

Thanks a lot, i will check on my end of i can also fix the rollup config

from grommet-controls.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.