1.0.13 • Published 9 months ago

@hodfords/vite-config-builder v1.0.13

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

Hodfords Vite Config Builder

Installation 🤖

  • Install PNPM latest version
  • Install Nodejs >= 20 ( Should be use NVM for install NodeJS )

  • With NPM:

npm install @hodfords/vite-config-builder --save
  • with PNPM:
pnpm install @hodfords/vite-config-builder

Usage 🚀

import createViteConfig from '@hodfords/vite-config-builder';

export default createViteConfig({
  isUsePWA: true,
  isUseGzip: true,
  defineEnv: ['API_URL', 'APP_URL'],
  aliasPath: ['components', 'containers', 'config', 'api'],
  autoImport: {
    config: {
      eslintrc: {
        enabled: true,
      },
      dirs: ['src/shared'],
      dts: 'src/types/auto-imports.d.ts',
    },
    libs: [
      {
        from: 'antd',
        imports: [
          'CollapseProps',
          'ButtonProps',
        ],
        type: true,
      },
      '@ant-design/plots': [
        ['Pie', 'PieChart'],
        ['Column', 'ColumnChart'],
      ],
    ],
  }
});

Options

isUsePWA - This option enable Vite PWA.

  • Type: boolean
  • Required: true

isUseGzip - This option enable Gzip.

  • Type: boolean
  • Required: true

defineEnv - This option define list Environments.

  • Type: Array(string)
  • Required: true

aliasPath - This option define alias path.

  • Type: Array(string)
  • Required: true

autoImport - This option define auto import libraries for Components, Functions, Utils, Types...

  • Type: Object(array)
  • Required: true

License 📝

This project is licensed under the MIT License

1.0.13

9 months ago

1.0.12

9 months ago

1.0.11

9 months ago

1.0.10

9 months ago

1.0.9

9 months ago

1.0.8

10 months ago

1.0.7

10 months ago

1.0.6

10 months ago

1.0.5

10 months ago

1.0.4

10 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago