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

[feature request] Use TypeScript instead #14

Open
JounQin opened this issue Aug 19, 2021 · 2 comments
Open

[feature request] Use TypeScript instead #14

JounQin opened this issue Aug 19, 2021 · 2 comments

Comments

@JounQin
Copy link

JounQin commented Aug 19, 2021

Rollup and its plugins are all using TypeScript now.

I'm using the following for workaround, but not sure if it is correct:

declare module 'rollup-plugin-module-replacement' {
  import { Plugin } from 'rollup'

  export interface ModuleReplacementPluginOptions {
    entries: Array<{
      find: RegExp
      replacement: string | ((importee: string) => string)
    }>
    customResolver?:
      | Plugin
      | ((updatedId: string, importerId: string) => string)
  }

  const replacement: (options?: ModuleReplacementPluginOptions) => Plugin

  export default replacement
}
@Acionyx
Copy link
Owner

Acionyx commented Aug 30, 2021

Hello @JounQin,

Thank you for the feature request. I've started migration to the TS and will release a new version once it's done. I don't have a specific timeline, but hopefully just 1-2 weeks.

@craigphicks
Copy link

I would like to manually path an imported package like

import {....} from "@myscope/mypkg"

from a known fixed path like

../mypkg/rls-dist

which contains a correct package.json with { ...,"name":"@myscope/mypkg",...}.
Is that somehow possible with your package (or in some other way)?

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

3 participants