aralroca / next-translate

Next.js plugin + i18n API for Next.js 🌍 - Load page translations and use them in an easy way!
MIT License
2.58k stars 207 forks source link

window is not defined 2.02 version with antd #1001

Open de24world opened 1 year ago

de24world commented 1 year ago

What version of this package are you using? 2.0.2

What operating system, Node.js, and npm version? node : 16.14.0 / npm 9.1.2

What happened? error - node_modules\next-translate-plugin\lib\cjs\loader.js??ruleSet[1].rules[13].use!.\node_modules\@ant-design\cssinjs\es\hooks\useHMR.js (12:0) @ error - window is not defined

image

What did you expect to happen? can use version 2.0.2 with antd without error

Are you willing to submit a pull request to fix this bug? no, just report bug

aralroca commented 1 year ago

@de24world thanks to report it. Would you create a repo that reproduces this bug to easy fix it? Thanks a lot!

aralroca commented 1 year ago

Should be fixed in 2.4.2, can you try it and confirms that is working now? Thanks