0.0.3 • Published 9 months ago

vite-plugin-antdv1-momentjs-resolver-zmh v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

vite-plugin-antdv1-momentjs-resolver

发布原仓库的最新版本

Solve the Bug of vite execution error because antd-vue version 1.7.8 imported moment by using interopDefault

Check the detail here #375

The main purpose of this plugin is to replace import * as moment from "mooment" in ant-design-vue.

  source = source.replace(/import\s\*\sas\smoment\sfrom/g, 'import moment from');

处理因为 ant-design 1.7.8 版本中使用了 import * as moment from "moment" 这种写法,导致在使用 vite 时,报错问题。

具体细节请查看 #375

Usage

$ yarn add vite-plugin-antdv1-momentjs-resolver
//  vite.cofnig.ts

import AntdMomentResolver from 'vite-plugin-antdv1-momentjs-resolver'

export default defineConfig(({ command }) => {
  return {
    plugins:[AntdMomentresolver()]
  }
})
0.0.3

9 months ago

0.0.2

9 months ago

0.0.1

9 months ago