0.5.0 • Published 2 years ago

unplugin-moment-to-dayjs v0.5.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

unplugin-moment-to-dayjs

NPM version

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

Install

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

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

Example: playground/

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

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

// 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