Created
June 18, 2016 20:38
-
-
Save ivanoats/207c207792ae20a62c1db2ec3f57526b to your computer and use it in GitHub Desktop.
gatsby-node.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// eslint-disable-next-line immutable/no-mutation,no-unused-vars | |
exports.modifyWebpackConfig = function (config, env) { | |
config.removeLoader('json') | |
config.loader('json', (cfg) => { | |
// eslint-disable-next-line immutable/no-mutation,no-param-reassign | |
cfg.test = /\.json/ | |
// eslint-disable-next-line immutable/no-mutation,no-param-reassign | |
cfg.loaders= ['markdown', 'json'] | |
return cfg | |
}) | |
return config | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment