You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can reproduce this issue when running this plugin on its own. Other plugins, such as node-resolve are known to cause issues.
I am running this plugin on .d.ts files generated by TypeScript. The plugin can consume .ts and even .js files (with allowJs: true), but this is known to cause issues.
This issue is not related to rolling up @types. The plugin ignores these by default, unless respectExternal is set. @types can contain hand-crafted code which is known to cause issues.
Code Snipped
I have a Yarn Wokspace monorepo. There's only one package from this monorepo that I "bundle" with rollup, but it depends on imported types from other adjacent packages within the monorepo. These types are not bundled when creating an index.d.ts with this plugin.
This is a problem because when the bundled package is used from outside the monorepo, it requires linking of all the other monorepo packages, which is not a good developer experience. What I want is for the types to be copied over if they have been brought from another package in my monorepo.
Is this possible with rollup-plugin-dts? Using the boilerplate example on your README (after using a seperate build config to convert from typescript) the resulting index.d.ts just contains import { SomeType } from '@my-monorepo/some/file' rather than bundling the contents of that file in preparation for external use.
If I use respectExternal (which I presume bundles all node_modules referenced) then it tries to bundle external packages (available on npm) that I don't want. And besides, it seems to choke on "use strict" in EventEmitter package so I can't even tell if it would work, were I able to narrow-down the packages to only include my own.
Error Message
No errors unless I try to "respectExternal".
The text was updated successfully, but these errors were encountered:
Checklist
Other plugins, such as
node-resolve
are known to cause issues..d.ts
files generated by TypeScript.The plugin can consume
.ts
and even.js
files (withallowJs: true
), but this is known to cause issues.@types
.The plugin ignores these by default, unless
respectExternal
is set.@types
can contain hand-crafted code which is known to cause issues.Code Snipped
I have a Yarn Wokspace monorepo. There's only one package from this monorepo that I "bundle" with rollup, but it depends on imported types from other adjacent packages within the monorepo. These types are not bundled when creating an
index.d.ts
with this plugin.This is a problem because when the bundled package is used from outside the monorepo, it requires linking of all the other monorepo packages, which is not a good developer experience. What I want is for the types to be copied over if they have been brought from another package in my monorepo.
Is this possible with rollup-plugin-dts? Using the boilerplate example on your README (after using a seperate build config to convert from typescript) the resulting
index.d.ts
just containsimport { SomeType } from '@my-monorepo/some/file'
rather than bundling the contents of that file in preparation for external use.If I use
respectExternal
(which I presume bundles all node_modules referenced) then it tries to bundle external packages (available on npm) that I don't want. And besides, it seems to choke on "use strict" in EventEmitter package so I can't even tell if it would work, were I able to narrow-down the packages to only include my own.Error Message
No errors unless I try to "respectExternal".
The text was updated successfully, but these errors were encountered: