add next.config.js for fixing react spring issue

see also:

- https://github.com/pmndrs/react-spring/issues/1078
- https://github.com/plouc/nivo/issues/1290
This commit is contained in:
c9s 2021-01-29 19:30:08 +08:00
parent fb662ba783
commit d9742b7412

16
frontend/next.config.js Normal file
View File

@ -0,0 +1,16 @@
const withTM = require('next-transpile-modules')
([
'@react-spring/three',
'@react-spring/web',
])
module.exports = withTM({
webpack: config => {
config.module.rules.push({
test: /react-spring/,
sideEffects: true,
})
return config
},
})