disable webpack5 for building

This commit is contained in:
c9s 2021-10-07 16:53:12 +08:00
parent 15c99d13d3
commit 72109a21b1
2 changed files with 6 additions and 2 deletions

View File

@ -1,2 +1,6 @@
/// <reference types="next" /> /// <reference types="next" />
/// <reference types="next/types/global" /> /// <reference types="next/types/global" />
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.

View File

@ -5,12 +5,12 @@ const withTM = require('next-transpile-modules')
]) ])
module.exports = withTM({ module.exports = withTM({
webpack: config => { webpack5: false,
webpack: (config, options) => {
config.module.rules.push({ config.module.rules.push({
test: /react-spring/, test: /react-spring/,
sideEffects: true, sideEffects: true,
}) })
return config return config
}, },
}) })