Webpack Guide
How to set up Tamagui with Webpack
Configure Webpack to compile Tamagui components and extract their styles.
First, install Webpack and webpack-cli:
yarn
npm
bun
pnpm
Then install the Tamagui plugin:
yarn
npm
bun
pnpm
Configuration
Add the plugin to your webpack.config.js. If you have a tamagui.build.ts
(recommended; see
compiler install docs),
no options are needed:
webpack.config.js
Or pass options inline:
webpack.config.js
Or use a minimal manual setup:
webpack.config.js
Usage
To run the server locally, install webpack-dev-server:
yarn
npm
bun
pnpm
Start the server with:
yarn
npm
bun
pnpm