diff --git a/.all-contributorsrc b/.all-contributorsrc index 41618210..809db82b 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -49,6 +49,15 @@ "contributions": [ "doc" ] + }, + { + "login": "daikiojm", + "name": "Daiki Ojima", + "avatar_url": "https://avatars.githubusercontent.com/u/10055293?v=4", + "profile": "https://daikiojm.me/", + "contributions": [ + "code" + ] } ], "contributorsPerLine": 7, diff --git a/CHANGELOG.md b/CHANGELOG.md index cee5d8ca..afa7983f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,19 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [1.4.0](https://github.com/nuxt-community/dayjs-module/compare/v1.3.1...v1.4.0) (2021-04-21) + + +### Bug Fixes + +* remove dynamic require for better `vite` support ([4ca06ac](https://github.com/nuxt-community/dayjs-module/commit/4ca06acdcf04bac3d74d9c2697d87733736e10c5)) + + +### Document Changes + +* update .all-contributorsrc [skip ci] ([37064f4](https://github.com/nuxt-community/dayjs-module/commit/37064f447a0c2f06ce17ffaaca931189919927d2)) +* update README.md [skip ci] ([2e8a10e](https://github.com/nuxt-community/dayjs-module/commit/2e8a10eb4d2088e346b8c5fc7f604357ffb23ca7)) + ### [1.3.1](https://github.com/nuxt-community/dayjs-module/compare/v1.3.0...v1.3.1) (2021-03-28) diff --git a/README.md b/README.md index 4bdb105d..c8f5dcf6 100644 --- a/README.md +++ b/README.md @@ -126,6 +126,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
Bryan Daniel Velastegui Lucero

💻
Wei

💻
かずえもん

📖 +
Daiki Ojima

💻 diff --git a/lib/plugin.js b/lib/plugin.js index 50b012b6..4981b719 100644 --- a/lib/plugin.js +++ b/lib/plugin.js @@ -1,8 +1,9 @@ import dayjs from 'dayjs' <%= options.locales.map(l => `import 'dayjs/locale/${l}'`).join('\n') %> +<%= options.plugins.map(l => `import ${l.replace(/[^A-Za-z]/g, '_')} from 'dayjs/plugin/${l}'`).join('\n') %> -<%= options.plugins.map(l => `dayjs.extend(require('dayjs/plugin/${l}'))`).join('\n') %> +<%= options.plugins.map(l => `dayjs.extend(${l.replace(/[^A-Za-z]/g, '_')})`).join('\n') %> <% if (options.defaultLocale) { %> dayjs.locale('<%= options.defaultLocale %>') diff --git a/package.json b/package.json index b23dbc4a..5800cee4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@nuxtjs/dayjs", - "version": "1.3.1", + "version": "1.4.0", "description": "The best way for use Day.js easily in your Nuxt.js project.", "author": { "name": "Takuma HANATANI(potato4d)"