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

TypeError: (0 , _Ripple2.default) is not a function #1924

Open
AltitudeTech opened this issue Jul 16, 2019 · 0 comments
Open

TypeError: (0 , _Ripple2.default) is not a function #1924

AltitudeTech opened this issue Jul 16, 2019 · 0 comments

Comments

@AltitudeTech
Copy link

this is the content of next.config.js

const withCSS = require("@zeit/next-css");
const internalReactToolboxDeps = /react-toolbox(?!.*node_modules)/;
const externalReactToolboxDeps = /node_modules(?!/react-toolbox(?!.*node_modules))/;

module.exports = withCSS({
cssModules: true,
cssLoaderOptions: {
importLoaders: 1,
localIdentName: "[local]__[hash:base64:5]"
},

webpack: (config, { dev, defaultLoaders }) => {
const { externals = [] } = config;
config.resolve.symlinks = false;
config.externals = externals.map(external => {
if (typeof external !== "function") return external;
return (ctx, req, cb) =>
internalReactToolboxDeps.test(req) ? cb() : external(ctx, req, cb);
});
config.module.rules.push({
test: /.jsx?$/,
loader: defaultLoaders.babel,
include: [internalReactToolboxDeps]
});

return config;

},
webpackDevMiddleware: config => {
const ignored = [config.watchOptions.ignored[0], externalReactToolboxDeps];
config.watchOptions.ignored = ignored;
return config;
}
});

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

1 participant