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

Failed parsing on Web #37

Open
mkrn opened this issue Dec 30, 2020 · 2 comments
Open

Failed parsing on Web #37

mkrn opened this issue Dec 30, 2020 · 2 comments

Comments

@mkrn
Copy link

mkrn commented Dec 30, 2020

Module parse failed: Unexpected token (52:19)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|   }
| 
>   static propTypes = {
|     isOn: PropTypes.bool.isRequired,
|     label: PropTypes.string,

babel.config.js

module.exports = function (api) {
  api.cache(true);
  return {
    presets: ["babel-preset-expo"],
    plugins: [
      "@babel/plugin-proposal-class-properties",

      [
        "babel-plugin-inline-import",
        {
          extensions: [".svg"],
        },
      ],
    ],
  };
};
@jonjamz
Copy link

jonjamz commented Jan 13, 2021

You probably need to transpile the module. If you're using Next, you can try this: https://www.npmjs.com/package/next-transpile-modules

@dgsunesen
Copy link

@mkrn I can confirm that using https://www.npmjs.com/package/next-transpile-modules in Next.js 10.1 works :)

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

3 participants