2020-06-22 15:15:19 -04:00
|
|
|
exports.onCreateWebpackConfig = ({ stage, actions, getConfig }) => {
|
|
|
|
|
actions.setWebpackConfig({
|
|
|
|
|
node: {
|
2020-07-06 13:56:15 -07:00
|
|
|
fs: 'empty'
|
|
|
|
|
}
|
2020-06-22 15:15:19 -04:00
|
|
|
})
|
2020-07-06 09:29:43 -07:00
|
|
|
|
2020-07-06 13:56:15 -07:00
|
|
|
// Ignore css order
|
|
|
|
|
if (stage === 'build-javascript') {
|
2020-06-22 15:15:19 -04:00
|
|
|
const config = getConfig()
|
|
|
|
|
const miniCssExtractPlugin = config.plugins.find(
|
2020-07-06 13:56:15 -07:00
|
|
|
plugin => plugin.constructor.name === 'MiniCssExtractPlugin'
|
2020-06-22 15:15:19 -04:00
|
|
|
)
|
|
|
|
|
if (miniCssExtractPlugin) {
|
|
|
|
|
miniCssExtractPlugin.options.ignoreOrder = true
|
|
|
|
|
}
|
|
|
|
|
actions.replaceWebpackConfig(config)
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-06-29 19:04:10 -03:00
|
|
|
|
2020-07-06 09:29:43 -07:00
|
|
|
exports.createPages = async ({ actions }, themeOptions) => {
|
2020-07-06 13:56:15 -07:00
|
|
|
const basePath = '/'
|
2020-07-06 09:29:43 -07:00
|
|
|
actions.createPage({
|
|
|
|
|
path: basePath,
|
2020-07-06 13:56:15 -07:00
|
|
|
component: require.resolve('./src/pages/index.js')
|
2020-07-06 09:29:43 -07:00
|
|
|
})
|
2020-06-29 19:04:10 -03:00
|
|
|
}
|