Back to Next Js

Turbopack + Loaders

examples/with-turbopack-loaders/README.md

16.2.51.4 KB
Original Source

Turbopack + Loaders

Turbopack supports a subset of webpack's loader API, allowing you to use some webpack loaders to transform code in Turbopack. This example shows you how to configure Next.js to use webpack loaders when running with next --turbo.

Install the dependencies and start the development server.

sh
npm install
npm run dev

or

sh
yarn
yarn dev

or

sh
pnpm install
pnpm dev

Deploy your own

How to use

Execute create-next-app with npm, Yarn, or pnpm to bootstrap the example:

bash
npx create-next-app --example with-turbopack-loaders with-turbopack-loaders-app
bash
yarn create next-app --example with-turbopack-loaders with-turbopack-loaders-app
bash
pnpm create next-app --example with-turbopack-loaders with-turbopack-loaders-app

Deploy it to the cloud with Vercel (Documentation).