Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/scottbedard/vue-cli-plugin-moment

moment.js plugin for vue-cli
https://github.com/scottbedard/vue-cli-plugin-moment

moment vue-cli webpack

Last synced: 2 months ago
JSON representation

moment.js plugin for vue-cli

Awesome Lists containing this project

README

        

# vue-cli-plugin-moment

[![NPM](https://img.shields.io/npm/v/vue-cli-plugin-moment.svg)](https://www.npmjs.com/package/vue-cli-plugin-moment)
[![MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/scottbedard/vue-cli-plugin-moment/blob/master/LICENSE)

This plugin configures webpack's use of moment.js to only include a few locales. Desired locales can be set by entering a CSV of [moment.js locales](https://github.com/moment/moment/tree/develop/locale) during installation, or by setting them manually in your `vue.config.js`. Below is an example configuration that includes only the English locales.

```js
module.exports = {
pluginOptions: {
moment: {
locales: ['en']
}
}
}
```
To demonstrate the payload differences to expect, here is a before and after using the above configuration.

| Before | After |
| :----: |:-----:|
| | |