Skip to content

Commit

Permalink
perf: use moment-locales-webpack-plugin
Browse files Browse the repository at this point in the history
This plugin doesnt install useless locales files
  • Loading branch information
ogiorgis committed Feb 14, 2025
1 parent 37ed4c5 commit ae9681e
Show file tree
Hide file tree
Showing 3 changed files with 1,625 additions and 2,658 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
"jest-puppeteer": "11.0.0",
"markdownlint-cli": "0.43.0",
"mini-css-extract-plugin": "2.9.2",
"moment-locales-webpack-plugin": "1.2.0",
"path": "0.12.7",
"prettier": "2.2.1",
"puppeteer": "24.1.1",
Expand Down
3 changes: 3 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const CopyWebpackPlugin = require('copy-webpack-plugin');
const { ProvidePlugin } = require('webpack');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const MomentLocalesPlugin = require('moment-locales-webpack-plugin');

const commonConfig = {
target: 'web',
Expand Down Expand Up @@ -42,6 +43,7 @@ const commonConfig = {
assert: require.resolve('assert'),
fs: false,
tls: false,
vm: false,
},
},
module: {
Expand Down Expand Up @@ -103,6 +105,7 @@ const commonConfig = {
jQuery: 'jquery',
'window.jQuery': 'jquery',
}),
new MomentLocalesPlugin(),
],
entry: {
index: ['./ui/index'],
Expand Down
Loading

0 comments on commit ae9681e

Please sign in to comment.