Closed robertovg closed 6 years ago
The ES6 tag is not transpiled into ES5. Create React App and most plug and play environments like it do not transpile libraries found in node_modules
. Try the #v0.8.0
tag for the time being which is CommonJS. We are working on an NPM module that supports both. Be on the look out for that issue solved. https://github.com/salesforce/design-system-react/issues/1146 It may not be until January, if you want to transition to the node module.
I'm going to close this, because the -ES6
is not compatible with createReactApp
. I'll add that to readme for the time being.
Thanks this solved the issue.
Yes, I think this will help other people too.
You are not the first to ask and probably won't be the last.
Hi, we are trying to use this design-system-react in our project, but we are not able due to a problem at the time of using it.
We have our project working and running with
react-scripts
, and from now we are able to use any library we want, with this exception. We followed the getting started official guide, we have the followingpackage.json
and everything really looks quite the same, but somehow we are not able to make it work.We even started a new project with Webpack 1.0 and no
react-scripts
installed following exactly the same,.babelrc:
and the samewebpack.config.js
:Everything works fine, till the moment we try to use any Component from it. For example, just adding the button example to one of our components:
Of course, we have the
handleClick
function implemented in the componentSomething interesting is if we just import the button it works and not using it, it works.
The exception we got is the following:
We used both, just the
@salesforce-ux/design-system
or thereact-lightning-design-system
with no problems in the applications. But we would like to take the advantage of this one, as looks amazing.So any help here will be welcome.