Skip to content

Instantly share code, notes, and snippets.

@fivethreeo
Last active May 9, 2021 15:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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