dayjs-webpack-plugin
A webpack plugin for dayjs.
- Pre-pack all the needed plugins and locales.
- Auto replace
moment
withdayjs
in source code.
Usage
- Install
dayjs-webpack-plugin
. - Add an instance of the plugin to the webpack plugin configuration.
Example
; const configuration = plugins: 'utc' locales: 'zh-cn' replaceMoment: true; moduleexports = // ... plugins: configuration ;
Configuration
Attribute | Description | Type | Accepted Values | Default |
---|---|---|---|---|
plugins | plugin name | Array[string] | all support plugins | [] |
locales | locale name | Array[string] | all support locales | [] |
replaceMoment | replace moment to dayjs with webpack alias config | Boolean | true / false | false |
preset | name of preset configuration | String | antd | - |