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

Overview

unplugin-moment-to-dayjs

NPM version

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

Install

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
You might also like...

This adapter allows the use of Moment.js with Chart.js

chartjs-adapter-moment Overview This adapter allows the use of Moment.js with Chart.js. Moment.js is a very heavy library and thus not recommended for

Dec 27, 2022

⏰ Day.js 2KB immutable date-time library alternative to Moment.js with the same modern API

⏰ Day.js 2KB immutable date-time library alternative to Moment.js with the same modern API

English | 简体中文 | 日本語 | Português Brasileiro | 한국어 | Español (España) | Русский Fast 2kB alternative to Moment.js with the same modern API Day.js is a

Dec 28, 2022

Timers for your websites using moment.js

web-timers Timers for your websites using moment.js This small library allows you to make a timer. The process is very simple. Installation You just n

Sep 9, 2022

Rollup + Babel + Prettier + Strict ESlint + VSCode - Enterprise grade boilerplate

Javascript package boilerplate by HackingBay Rollup + Babel + Prettier + Strict ESlint + VSCode - Enterprise grade boilerplate Minimalist js package b

Dec 28, 2021

Rollup + React + Babel + Prettier + Strict ESlint and Stylelint + Sass + VSCode + Playground app - Enterprise grade boilerplate

React package boilerplate by HackingBay Rollup + React 17 + Babel + Prettier + Strict ESlint and Stylelint + Sass + VSCode + Playground app - Enterpri

Jan 19, 2022

⏰ Day.js 2kB immutable date-time library alternative to Moment.js with the same modern API

⏰ Day.js 2kB immutable date-time library alternative to Moment.js with the same modern API

English | 简体中文 | 日本語 | Português Brasileiro | 한국어 | Español (España) | Русский Fast 2kB alternative to Moment.js with the same modern API Day.js is a

Dec 28, 2022

testing rollup dist for cjs/esm

std.module.format version 0.1.3 std.module.format Overview TLDR Avoid Default Exports and Prefer Named Exports Context Summary Decision ECMAScript Mod

Dec 11, 2022

A JavaScript component that is a date & time range picker, no need to build, no dependencies except Moment.js, that is based on Dan Grossman's bootstrap-daterangepicker.

A JavaScript component that is a date & time range picker, no need to build, no dependencies except Moment.js, that is based on Dan Grossman's bootstrap-daterangepicker.

vanilla-datetimerange-picker Overview. A JavaScript component that is a date & time range picker, no need to build, no dependencies except Moment.js,

Dec 6, 2022

Query for CSS brower support data, combined from caniuse and MDN, including version support started and global support percentages.

css-browser-support Query for CSS browser support data, combined from caniuse and MDN, including version support started and global support percentage

Nov 2, 2022

Bootstrap5-tags - Replace select[multiple] with nices badges

Bootstrap5-tags - Replace select[multiple] with nices badges

Tags for Bootstrap 4/5 How to use An ES6 native replacement for select using standards Bootstrap 5 (and 4) styles. No additional CSS needed! Supports

Jan 9, 2023

Internationalisation - A jQuery-Plugin to replace alternate version of text for client side internationalization.

Project status Use case A jQuery plugin to replace alternate version of text for client side internationalisation. Content [TOC] Installation Classica

Nov 30, 2022

Replace ansi escape sequences with tokens indicating what they are

Replace ansi escape sequences with tokens indicating what they are

Mar 7, 2022

Find in note Trilium widget to replace the crappy ctrl+f search.

Trilium-FindWidget Find in note Trilium widget to replace the crappy ctrl+f search. Video sandbox.-.Trilium.Notes.2022-04-22.15-41-19_rescaled.mp4 Fea

Nov 22, 2022

Replace your Spotify album artwork with an animated version.

Spotify Animated Album Artwork Replace your Spotify album artwork with an animated version. preview.mp4 Install My english is broken, please bear with

Jul 14, 2022

It's an alert library build with JavaScript. You can replace your traditional JavaScript alert, confirm and toast with the library.

asteroid-alert It's an alert library build with JavaScript. You can replace your traditional JavaScript alert, confirm with the library. It has also e

Mar 12, 2021

Vite-plugin-web-extension - A vite plugin for generating cross browser platform, ES module based web extensions.

vite-plugin-web-extension A vite plugin for generating cross browser platform, ES module based web extensions. Features Manifest V2 & V3 Support Compl

Dec 31, 2022

Vue 3 + Vite + SSR template based on Vite Plugin SSR and inspired by Vitesse

Vite Vue SSR Starter Vue 3 + Vite + SSR template based on Vite Plugin SSR and inspired by Vitesse Features ⚡️ Vue 3, Vite 2, TypeScript 🗂 Domain-Driv

Aug 2, 2022

Add WebAssembly ESM integration to Vite and support wasm-pack generated modules

Add WebAssembly ESM integration (aka. Webpack's asyncWebAssembly) to Vite and support wasm-pack generated modules

Dec 26, 2022

Detect webpage updates and notify user to reload. support vite and umijs

English | 简体中文 plugin-web-update-notification Detect webpage updates and notify user to reload. support vite and umijs. Take the git commit hash as th

Dec 26, 2022
Releases(v0.4.0)
⏰ Day.js 2KB immutable date-time library alternative to Moment.js with the same modern API

English | 简体中文 | 日本語 | Português Brasileiro | 한국어 | Español (España) | Русский Fast 2kB alternative to Moment.js with the same modern API Day.js is a

null 41.7k Dec 28, 2022
⏰ Day.js 2kB immutable date-time library alternative to Moment.js with the same modern API

English | 简体中文 | 日本語 | Português Brasileiro | 한국어 | Español (España) | Русский Fast 2kB alternative to Moment.js with the same modern API Day.js is a

null 41.7k Dec 28, 2022
:clock8: The original jQuery plugin that makes it easy to support automatically updating fuzzy timestamps (e.g. "4 minutes ago").

timeago: a jQuery plugin Timeago is a jQuery plugin that makes it easy to support automatically updating fuzzy timestamps (e.g. "4 minutes ago" or "ab

Ryan McGeary 3.8k Dec 25, 2022
Lingui loader for Vite, Rollup, Webpack, and more

unplugin-lingui-loader It’s a good practice to use compiled message catalogs during development. However, running compile everytime messages are chang

Aloha 10 Nov 3, 2022
Rust dbg! in js powered by rollup/vite plugin system

rollup-plugin-dbg This plugin is also compatible with vite use with rollup import { defineConfig } from "rollup"; import config from "./package.json";

Jason 17 Aug 18, 2022
A starter template that uses Phaser 3, TypeScript, Electron and Rollup and Vite for bundling.

Phaser TypeScript Electron starter template This is a ??️ Phaser 3 starter with ⌨️ TypeScript and ⚛️ Electron, ?? Rollup and Vite. ?? ?? HOT RELOAD ON

null 11 Nov 25, 2022
Replace files during Vite build - handy when replacing strings is not enough

vite-plugin-replace-files Replace files during Vite build - handy when replacing strings is not enough. Install Install with your favorite package man

Kamil Banach 7 Sep 21, 2022
Timezone support for moment.js

Moment Timezone IANA Time zone support for Moment.js Project Status Moment-Timezone is an add-on for Moment.js. Both are considered legacy projects, n

Moment.js 3.7k Jan 1, 2023
use this to replace redux,you can use useActions to change context value and useActions return a mutable function collection

English | 中文 NOTE react-context-mutation is a lighter and more convenient state manager designed for react applications. It aims to replace the Redux

null 19 Feb 22, 2022
Easily add emoji support to your website! Replace keywords with emoji's :yum:

Emoji-Parser.js ?? A emoji parser to easily add emoji support to your website Show your support! Features: Use's the same style GitHub does! TON's of

Marketing Pipeline 13 Sep 9, 2022