turbo
turbo copied to clipboard
[turbopack]
What version of Turbopack are you using?
alpha
What package manager are you using / does the bug impact?
npm
What operating system are you using?
Windows
Describe the Bug
Hi, I had set up my aliases which work fine when using the default bundler (Webpack) in Next 13. However, it all breaks when I use the turbo flag to start the dev server.
Expected Behavior
When using the npm run dev --turbo
on a Next 13 project, it should recognize the path aliases as defined in the jsconfig.json
file.
To Reproduce
- Install Next 13 and enable turbo by changing
npm run dev
tonpm run dev --turbo
- Create a directory named
lib
and inside it create two moreassets
andcomponents
- Create a
jsconfig.js
file with the following content
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/assets/*": [
"lib/assets/*"
],
"@/components/*": [
"lib/components/*"
]
}
}
}
- Start the dev server with
npm run dev
- Try the path alias in an import
Reproduction Repo
No response
it only happens when using --turbo
"scripts": {
"dev": "next dev --turbo", 🔴
"dev": "next dev", 🟢
}
🔴 yarn dev --turbo
🟢 yarn turbo dev
jsconfig.json
right now has not been supported. I found it a feature request as #2357 mentioned.
Same issue for me using the following config:
{ "compilerOptions": { "baseUrl": "src" } }
jsconfig.json
support added in Next.js 13.2