diff --git a/docs/next.config.js b/docs/next.config.js index 3999b47..457ba7f 100644 --- a/docs/next.config.js +++ b/docs/next.config.js @@ -1,10 +1,13 @@ const path = require('path') const isProd = process.env.VERCEL_ENV === 'production' const withMDX = require('@next/mdx')({ extension: /\.mdx?$/ }) +const monorepoRoot = path.resolve(__dirname, '..') module.exports = withMDX({ pageExtensions: ['js', 'jsx', 'mdx'], assetPrefix: isProd ? 'https://theme.hackclub.com' : '', + outputFileTracingRoot: monorepoRoot, turbopack: { - root: path.resolve(__dirname) - } + root: monorepoRoot + }, + transpilePackages: ['@hackclub/theme', '@hackclub/meta'] }) diff --git a/docs/package.json b/docs/package.json index 7a64e59..a66fd29 100644 --- a/docs/package.json +++ b/docs/package.json @@ -7,8 +7,8 @@ "scripts": { "dev": "next", "prebuild": "yarn build:meta && yarn build:theme", - "build:meta": "cd ../packages/meta && npx -y microbundle --jsxImportSource react --jsx jsx --globals react/jsx-runtime=jsxRuntime", - "build:theme": "cd ../packages/theme && npx -y microbundle", + "build:meta": "cd ../packages/meta && npx microbundle --jsxImportSource react --jsx jsx --globals react/jsx-runtime=jsxRuntime", + "build:theme": "cd ../packages/theme && npx microbundle", "build": "next build", "start": "yarn run dev" }, diff --git a/packages/meta/package.json b/packages/meta/package.json index 2652dc9..11fe2df 100644 --- a/packages/meta/package.json +++ b/packages/meta/package.json @@ -27,6 +27,7 @@ "react-dom": ">=19.0.0" }, "devDependencies": { + "microbundle": "^0.15.1", "react": "^19.2.4", "react-dom": "^19.2.4" }, diff --git a/packages/theme/package.json b/packages/theme/package.json index f2ada13..fa66a77 100644 --- a/packages/theme/package.json +++ b/packages/theme/package.json @@ -29,6 +29,7 @@ "react-dom": ">=19.0.0" }, "devDependencies": { + "microbundle": "^0.15.1", "react": "^19.2.4", "react-dom": "^19.2.4" },