Numerous Problems Multiplied

    vite-plugin-antdv1-momentjs-resolver

    1.0.6 • Public • Published

    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()]
      }
    })

    Install

    npm i vite-plugin-antdv1-momentjs-resolver

    DownloadsWeekly Downloads

    8

    Version

    1.0.6

    License

    MIT

    Unpacked Size

    4.2 kB

    Total Files

    4

    Last publish

    Collaborators

    • buff2017