Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible to modify JS output but not .d.ts output? #29

Open
raijinsetsu opened this issue Mar 24, 2020 · 3 comments
Open

Possible to modify JS output but not .d.ts output? #29

raijinsetsu opened this issue Mar 24, 2020 · 3 comments

Comments

@raijinsetsu
Copy link

We have a plugin architecture. The "base" of that is in the host server. We published a virtual package so that plugin developers did not have to develop "inside" the server's source repository.

We had been manually re-writing the JS output, but this messes up the map files.

This plugin appears to do 90% of what we need but has the side-effect of breaking the .d.ts imports, which should continue to reference the NPM module and not some local thing.

Any issues with adding this in as a feature? I haven't looked at the code yet, so I'm not sure how difficult this would be to implement or if it's even possible given what Typescript allows...

@zerkalica
Copy link
Owner

This looks incompatible with standard type checking behavior in typescript (in ide, in .ts and .d.ts).

Why not to use yarn workspaces or lerna, https://github.com/zerkalica/mobx-psy for example.

I think, my plugin totally unnecessary with workspaces.

@raijinsetsu
Copy link
Author

raijinsetsu commented Apr 4, 2020 via email

@zerkalica
Copy link
Owner

Try 1.7.17, set disableForDeclarations to true

    "plugins": [
      {
        "transform": "@zerollup/ts-transform-paths",
        "disableForDeclarations": true
      }
    ]

This is experimental feature, i don't shure, that setting disableForDeclarations to true do not breaks in some cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants