chore: revert back code
This commit is contained in:
parent
03eba8f996
commit
783c32024e
2 changed files with 26 additions and 15 deletions
11
examples/next-css/next.config.js
Normal file
11
examples/next-css/next.config.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
// @ts-check
|
||||
|
||||
/**
|
||||
* @type {import('next').NextConfig}
|
||||
*/
|
||||
const nextConfig = {
|
||||
output: "export",
|
||||
};
|
||||
|
||||
module.exports = nextConfig;
|
||||
|
|
@ -2266,22 +2266,22 @@ export default async function getBaseWebpackConfig(
|
|||
const webpack5Config = webpackConfig as webpack.Configuration
|
||||
|
||||
// disable lazy compilation of entries as next.js has it's own method here
|
||||
// if (webpack5Config.experiments?.lazyCompilation === true) {
|
||||
// webpack5Config.experiments.lazyCompilation = {
|
||||
// entries: false,
|
||||
// }
|
||||
// } else if (
|
||||
// typeof webpack5Config.experiments?.lazyCompilation === 'object' &&
|
||||
// webpack5Config.experiments.lazyCompilation.entries !== false
|
||||
// ) {
|
||||
// webpack5Config.experiments.lazyCompilation.entries = false
|
||||
// }
|
||||
if (webpack5Config.experiments?.lazyCompilation === true) {
|
||||
webpack5Config.experiments.lazyCompilation = {
|
||||
entries: false,
|
||||
}
|
||||
} else if (
|
||||
typeof webpack5Config.experiments?.lazyCompilation === 'object' &&
|
||||
webpack5Config.experiments.lazyCompilation.entries !== false
|
||||
) {
|
||||
webpack5Config.experiments.lazyCompilation.entries = false
|
||||
}
|
||||
|
||||
// if (typeof (webpackConfig as any).then === 'function') {
|
||||
// console.warn(
|
||||
// '> Promise returned in next config. https://nextjs.org/docs/messages/promise-in-next-config'
|
||||
// )
|
||||
// }
|
||||
if (typeof (webpackConfig as any).then === 'function') {
|
||||
console.warn(
|
||||
'> Promise returned in next config. https://nextjs.org/docs/messages/promise-in-next-config'
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
const rules = webpackConfig.module?.rules || []
|
||||
|
|
Loading…
Reference in a new issue