toggle-switch-react-native
toggle-switch-react-native copied to clipboard
Failed parsing on Web
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"],
},
],
],
};
};
You probably need to transpile the module. If you're using Next, you can try this: https://www.npmjs.com/package/next-transpile-modules
@mkrn I can confirm that using https://www.npmjs.com/package/next-transpile-modules in Next.js 10.1 works :)