-
-
Notifications
You must be signed in to change notification settings - Fork 615
Closed
Description
Rollup Version
3.25.1
Operating System (or Browser)
Browser
Node Version (if applicable)
16.14.2
Link To Reproduction
Reproduction Steps
- Open https://stackblitz.com/edit/stackblitz-starters-tyztyr?file=packages%2Fmy-package-with-rollup%2Frollup.config.mjs
- Run
cd packages/my-package-with-rollup/ - Run
npm run build
Expected Behaviour
Using the @rollup/plugin-typescript plugin in conjunction with the @rollup/plugin-node-resolve plugin should allow rollup to parse TypeScript in files outside the main directory:
// rollup.config.mjs
import nodeResolve from '@rollup/plugin-node-resolve';
import typescript from '@rollup/plugin-typescript';
export default {
input: ['index.ts'],
output: {
file: 'bundle.js',
format: 'esm',
},
plugins: [nodeResolve(), typescript()],
};
// package.json
...
"dependencies": {
"my-workspace-package": "workspace:^"
}
Actual Behaviour
Rollup errors: [!] RollupError: Unexpected token (Note that you need plugins to import files that are not JavaScript).
Including outside files in the include pattern does nothing as well:
typescript({ include: ['index.ts', '../my-workspace-package/index.ts'] }),
The filterRoot set to false also doesn't fix it, which I would expect it to based on the docs:
typescript({ filterRoot: flase })
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels