fix(Webpack dev-server build warning): Create false value alias for `moment-with-locales` (#28229)

This commit is contained in:
Ross Mabbett 2024-04-29 13:27:06 -04:00 committed by GitHub
parent 743c0bde7e
commit 4d2247a7e1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 0 deletions

View File

@ -288,6 +288,12 @@ const config = {
// TODO: remove Handlebars alias once Handlebars NPM package has been updated to
// correctly support webpack import (https://github.com/handlebars-lang/handlebars.js/issues/953)
handlebars: 'handlebars/dist/handlebars.js',
/*
Temporary workaround to prevent Webpack from resolving moment locale
files, which are unnecessary for this project and causing build warnings.
This prevents "Module not found" errors for moment locale files.
*/
'moment/min/moment-with-locales': false,
},
extensions: ['.ts', '.tsx', '.js', '.jsx', '.yml'],
fallback: {