Installation
yarn add -D @ekz/packer
npm install --save-dev @ekz/packer
@ekz/packer installs both bundlers. An app that only uses one can install that half on its own and skip the other bundler's toolchain:
| Package | Installs | Import |
|---|---|---|
@ekz/packer | Webpack, Vite, ESLint config, tsconfig presets | require('@ekz/packer').vite, .webpack |
@ekz/packer-vite | Vite, @vitejs/plugin-react, vite-plugin-checker, sass, tsconfig presets | require('@ekz/packer-vite') |
@ekz/packer-webpack | Webpack, its loaders and plugins, Babel, the eslint engine for eslint-webpack-plugin, sass, tsconfig presets | require('@ekz/packer-webpack') |
The standalone packages do not ship the ESLint config; add @ekz/eslint-config-packer alongside them if you want it.
Next steps
- Add a Webpack config or try Vite
- Add ESLint flat config (optional but recommended)
- Add recommended scripts to
package.json - Copy or adapt the example app
If you are upgrading from 0.16, read Migrating from 0.16. If you are moving an existing app from Webpack to Vite, read Migrating from Webpack to Vite.