Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/scottbedard/vue-cli-plugin-moment
- Owner: scottbedard
- License: mit
- Created: 2018-09-12T05:16:50.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-09-12T07:38:39.000Z (over 6 years ago)
- Last Synced: 2024-10-24T12:15:14.543Z (2 months ago)
- Topics: moment, vue-cli, webpack
- Language: JavaScript
- Size: 5.86 KB
- Stars: 16
- Watchers: 4
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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 |
| :----: |:-----:|
| | |