Content-Length: 313993 | pFad | http://github.com/Dunqing/unplugin-moment-to-dayjs

3C GitHub - Dunqing/unplugin-moment-to-dayjs: Replace moment with dayjs, support use in vite, rollup, webpack
Skip to content

Dunqing/unplugin-moment-to-dayjs

Repository files navigation

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








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/Dunqing/unplugin-moment-to-dayjs

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy