Skip to content

Commit

Permalink
Prune date-fns locales, bump sass TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
jgoz committed Jul 24, 2024
1 parent a0437b6 commit 6105862
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion web-console/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ const webpack = require('webpack');

const { version } = require('./package.json');

const supportedLocales = ['en-US'];

function friendlyErrorFormatter(e) {
return `${e.severity}: ${e.content} [TS${e.code}]\n at (${e.file}:${e.line}:${e.character})`;
}
Expand All @@ -47,6 +49,13 @@ module.exports = env => {
'global': {},
'NODE_ENV': JSON.stringify(mode),
}),

// Prune date-fns locales to only those that are supported
// https://date-fns.org/v2.30.0/docs/webpack
new webpack.ContextReplacementPlugin(
/^date-fns[/\\]locale$/,
new RegExp(`\\.[/\\\\](${supportedLocales.join('|')})[/\\\\]index\\.js$`),
),
];

return {
Expand Down Expand Up @@ -137,7 +146,7 @@ module.exports = env => {
// have access to them at this point. None of the components that use svg icons
// via CSS are themselves being used by the web console, so we can safely omit the icons.
//
// TODO: Re-evaluate after upgrading to Blueprint v5
// TODO: Re-evaluate after upgrading to Blueprint v6
'svg-icon($_icon, $_path)': () => new SassString('transparent'),
},
},
Expand Down

0 comments on commit 6105862

Please sign in to comment.