diff --git a/src/createRollupConfig.ts b/src/createRollupConfig.ts index 0092baf28..b637f34e7 100644 --- a/src/createRollupConfig.ts +++ b/src/createRollupConfig.ts @@ -56,6 +56,12 @@ export async function createRollupConfig( if (id === 'babel-plugin-transform-async-to-promises/helpers') { return false; } + /** + * ~/ or @/ for srcDir + */ + if (id.startsWith('@/') || id.startsWith('~/')) { + return false; + } return external(id); }, // Rollup has treeshaking by default, but we can optimize it further...