Skip to content

Instantly share code, notes, and snippets.

@fivethreeo
Last active May 9, 2021 15:00
Show Gist options
  • Save fivethreeo/c6bc4ef536681d712913069f7ffe967e to your computer and use it in GitHub Desktop.
Save fivethreeo/c6bc4ef536681d712913069f7ffe967e to your computer and use it in GitHub Desktop.
// razzle.config.js
'use strict';
module.exports = {
modifyWebpackOptions({
options: {
webpackOptions, // the modified options that was used to configure webpack/ webpack loaders and plugins
}
}) {
webpackOptions.babelRule.include = webpackOptions.babelRule.include.concat([
/grommet/
]);
webpackOptions.notNodeExternalResMatch = (request, context) => {
return /grommet/.test(request)
};
return webpackOptions;
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment