跳至正文
Wener Notes

turbopack

约 1 分钟阅读
bash
next dev --turbo
  • 在 app/layout.tsx import styles/dist.css
next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
  reactStrictMode: true, // Recommended for the `pages` directory, default in `app`.
  swcMinify: true,
  experimental: {
    // Required:
    appDir: true,
  },
};

module.exports = nextConfig;

tailwindcss

src/styles/global.css
@tailwind base;
@tailwind components;
@tailwind utilities;
bash
pnpm tailwindcss -i src/styles/globals.css -o src/styles/dist.css --watch
json
{
  "scripts": {
    "dev": "concurrently \"next dev --turbo\" \"tailwindcss -i src/styles/globals.css -o src/styles/dist.css --watch\"",
    "build": "tailwindcss -i src/styles/globals.css -o src/styles/dist.css --watch && next build"
  }
}

关联信息

反向链接、本文链接的其他页面和外部资料。

参考资料

其他外链2 条
最近更新commit 3e836a9编辑