Skip to content

Instantly share code, notes, and snippets.

@jkroepke
Last active October 14, 2019 18:19
Show Gist options
  • Save jkroepke/9485f979e24e0cae8f7044b52d036f8e to your computer and use it in GitHub Desktop.
Save jkroepke/9485f979e24e0cae8f7044b52d036f8e to your computer and use it in GitHub Desktop.
const WebpackFilePreprocessorPlugin = require('@jkroepke/webpack-file-preprocessor-plugin');
module.exports = config => {
config.plugins.push(
new WebpackFilePreprocessorPlugin({
pattern: /\.(json)$/,
process: source => JSON.stringify(JSON.parse(source)),
})
);
return config;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment