Skip to content

Latest commit

 

History

History
77 lines (52 loc) · 1.26 KB

README.md

File metadata and controls

77 lines (52 loc) · 1.26 KB

unplugin-moment-to-dayjs

NPM version

Replace moment with dayjs, support use in vite, rollup, webpack

Installation

npm i unplugin-moment-to-dayjs
Vite
// vite.config.ts
import momentToDayjs from 'unplugin-moment-to-dayjs/vite'

export default defineConfig({
  plugins: [
    momentToDayjs({ /* options */ }),
  ],
})

Example: playground/


Rollup
// rollup.config.js
import momentToDayjs from 'unplugin-moment-to-dayjs/rollup'

export default {
  plugins: [
    momentToDayjs({ /* options */ }),
  ],
}


Webpack
// webpack.config.js
module.exports = {
  /* ... */
  plugins: [
    require('unplugin-moment-to-dayjs/webpack')({ /* options */ }),
  ],
}


Options

Please reference antd-dayjs-webpack-plugin

Examples

Thanks

  • moment
  • dayjs
  • antd-dayjs-webpack-plugin