1.0.13 • Published 7 months ago

@hodfords/vite-config-builder v1.0.13

Weekly downloads
-
License
-
Repository
github
Last release
7 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

7 months ago

1.0.12

7 months ago

1.0.11

8 months ago

1.0.10

8 months ago

1.0.9

8 months ago

1.0.8

8 months ago

1.0.7

8 months ago

1.0.6

8 months ago

1.0.5

8 months ago

1.0.4

8 months ago

1.0.3

8 months ago

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago