Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

appropriate loader to handle this file type #21

Open
gopalramadugu opened this issue Feb 6, 2019 · 1 comment
Open

appropriate loader to handle this file type #21

gopalramadugu opened this issue Feb 6, 2019 · 1 comment

Comments

@gopalramadugu
Copy link

gopalramadugu commented Feb 6, 2019

(INFORMATION):

  • Contributions are welcomed and appreciated with open hearts and open fingers. Before you continue, consider the following: If you have a "How do I do ...?" question, this is not the proper channel. Instead, please use stackoverflow: stackoverflow.com/questions/tagged/smoothslider
  • These "Issues" are meant for technical problems, bugs, and proposals related to the library, although, exceptions are made for noteworthy cases. If you're reporting a bug, please use the below bug template.

(BUG TEMPLATE):

What's your environment:

Babel 7, preact 8.4.2

Expected behavior:

App should run

Actual behavior:

Getting below error.
`./node_modules/smoothslider/component/index.js 92:6
Module parse failed: Unexpected token (92:6)
You may need an appropriate loader to handle this file type.
| descriptionStyles = Object.assign(background, descriptionStyles);
| return (

  <div className='smooth-slider'>

|


| {children}
`

What steps and/or code will reproduce the bug:

Added the SmoothSlider Library.
.babelrc
{ "presets": ["@babel/preset-env", "@babel/preset-react"], "plugins": [ ["@babel/plugin-transform-react-jsx", { "pragma":"h" }], ["@babel/plugin-proposal-decorators", { "legacy": true }], ["@babel/plugin-proposal-class-properties"], ["@babel/plugin-transform-runtime"], ["@babel/plugin-transform-object-assign"], ["@babel/plugin-proposal-object-rest-spread", { "loose": true, "useBuiltIns": true }], ["@babel/plugin-transform-destructuring"] ] }

Have you identified what's causing the bug and/or potential solutions:

Tied multiple plugins but no luck.

Additional information and details:

@tmartin2089
Copy link

tmartin2089 commented Apr 18, 2019

Think some babel plugins need to be updated. You can get it working by running babel-updater and changing the .babelrc to the following
{ "plugins": [ "@babel/plugin-transform-modules-commonjs" ], "presets": [ "@babel/preset-env", [ "@babel/preset-react", { "pragma": "h", // default pragma is React.createElement "pragmaFrag": "DomFrag", // default is React.Fragment "throwIfNamespace": false // defaults to true }, ], ] }

make sure you install @babel/preset-react

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

No branches or pull requests

2 participants