@tholu/nuxt-dayjs-module
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

@tholu/nuxt-dayjs-module

Forked from @nathanchase/nuxt-dayjs-module for dependency updates. This is a Nuxt 3 compatible module built with the official Nuxt 3 module-builder for dayjs. This is meant as a Nuxt 3 version of dayjs-module to satisfy Nuxt 3 support.

Usage:

// ./nuxt.config.ts
export default defineNuxtConfig({
  modules: [
    '@tholu/nuxt-dayjs-module'
  ]
  ...
});

Add dayjs plugins (ex: duration) via configuration in nuxt.config like so:

dayjs: {
    plugins: [
      'duration',
      'relativeTime',
      'advancedFormat',
      'weekday'
    ]
}

See /playground/app.vue for working examples.

On npm: https://www.npmjs.com/package/@tholu/nuxt-dayjs-module

Development

  • Run 'npm install' to install required packages.
  • Run npm run dev:prepare to generate type stubs.
  • Use npm run dev to start playground in development mode.

Readme

Keywords

Package Sidebar

Install

npm i @tholu/nuxt-dayjs-module

Weekly Downloads

10

Version

2.0.0

License

MIT

Unpacked Size

6.25 kB

Total Files

11

Last publish

Collaborators

  • tholu