Closed FckYeah closed 3 years ago
Any good solution? Encountered the same issue when target is set to serverless
(Next.js 10.1.x, Webpack 4):
module.exports = withAntdLess({
target: "serverless",
modifyVars: { ... },
})
TypeError: (0 , _styleChecker.canUseDocElement) is not a function
The serverless build will fail with error
TypeError: (0 , _styleChecker.isStyleSupport) is not a function
. I used a solution from this issue: https://github.com/vercel/next.js/issues/8151I don't know how it would affect the server build if we use an extended regex without any conditions. At least it buildable :D So, I made the condition just in case.