-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NextJS Webpack Version 5 Build Error #62
Comments
I just bumped into the same error. |
@iamkun Could you see? |
i have same issue in nextjs webpack 5 |
👍 Same issue here. Are there any plans to update this plugin to support Webpack 5? For now it's easy to continue using Webpack 4 but the next major version of NextJS will force users onto Webpack 5. This means users will need to chose between removing this (amazing!) plugin or live with being stuck on version 10 of NextJS. |
@someyoungideas @icflorescu @AkramiPro @FreyrThorv |
Any update on this issue please? I dont want to use moment as it is deprecated. |
You can use this solution: |
I can confirm that this works. Too bad I spent the time setting up the plugin only to find it not working 😩 Thanks @tientran0019 🙏 |
If you're using typescript, you can go w/ this (source): import { Dayjs } from 'dayjs';
import dayjsGenerateConfig from 'rc-picker/lib/generate/dayjs';
import generatePicker from 'antd/lib/date-picker/generatePicker';
import 'antd/lib/date-picker/style/index';
const DatePicker = generatePicker<Dayjs>(dayjsGenerateConfig);
export default DatePicker; Caveat -- if you take the code from antd's own Replace Moment.js section, they're already using ES module imports:
For some reason, these modules aren't transpilable -- not even w/ So, import from
|
This solution does not support localisation... |
I am currently using NextJS with this webpack plugin within the
next.config.js
. When I attempt to update to use webpack version 5 with NextJS I get the following build error.The text was updated successfully, but these errors were encountered: