Skip to content

Commit

Permalink
fix(Webpack dev-server build warning): Create false value alias for `…
Browse files Browse the repository at this point in the history
…moment-with-locales` (#28229)
  • Loading branch information
rtexelm authored Apr 29, 2024
1 parent 743c0bd commit 4d2247a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions superset-frontend/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down

0 comments on commit 4d2247a

Please sign in to comment.