mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-14 00:32:35 +10:00
28 lines
701 B
JavaScript
28 lines
701 B
JavaScript
exports.onCreateWebpackConfig = ({ stage, actions, getConfig }) => {
|
|
if (stage === 'build-javascript') {
|
|
const config = getConfig();
|
|
const miniCssExtractPlugin = config.plugins.find(
|
|
(plugin) => plugin.constructor.name === 'MiniCssExtractPlugin',
|
|
);
|
|
if (miniCssExtractPlugin) {
|
|
miniCssExtractPlugin.options.ignoreOrder = true;
|
|
}
|
|
actions.replaceWebpackConfig(config);
|
|
}
|
|
|
|
if (stage === 'build-html') {
|
|
actions.setWebpackConfig({
|
|
externals: [/^firebase/],
|
|
});
|
|
}
|
|
};
|
|
|
|
exports.onCreatePage = async ({ page, actions }) => {
|
|
const { createPage } = actions;
|
|
|
|
if (page.path.match(/^\/r/)) {
|
|
page.matchPath = '/r/*';
|
|
createPage(page);
|
|
}
|
|
};
|