Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

moment-locales-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

moment-locales-webpack-plugin

Strip unused locales from Moment.js

  • 1.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is moment-locales-webpack-plugin?

The moment-locales-webpack-plugin is a Webpack plugin designed to optimize the Moment.js library by removing unused locales. This helps reduce the bundle size of your application, making it more efficient.

What are moment-locales-webpack-plugin's main functionalities?

Remove Unused Locales

This feature allows you to remove all unused locales from Moment.js, reducing the bundle size significantly.

const MomentLocalesPlugin = require('moment-locales-webpack-plugin');

module.exports = {
  plugins: [
    new MomentLocalesPlugin()
  ]
};

Keep Specific Locales

This feature allows you to specify which locales you want to keep in your bundle. In this example, only 'es-us' and 'ru' locales are kept.

const MomentLocalesPlugin = require('moment-locales-webpack-plugin');

module.exports = {
  plugins: [
    new MomentLocalesPlugin({
      localesToKeep: ['es-us', 'ru']
    })
  ]
};

Other packages similar to moment-locales-webpack-plugin

FAQs

Package last updated on 15 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc