TrySound / rollup-plugin-string

Converts text files to modules
MIT License
85 stars 13 forks source link

Typescript incompatible #22

Closed AnthonyCrowcroft closed 4 years ago

AnthonyCrowcroft commented 4 years ago

I can't for the life of me get this to work with our typescript library. It is based on this: https://github.com/Hotell/typescript-lib-starter

any suggestions or direction would be super appreciated.

jacksteamdev commented 4 years ago

A wildcard module declaration should do the trick.

// modules.d.ts
declare module '*.md' {
  const markdown: string
  export = markdown
}
AnthonyCrowcroft commented 4 years ago

awesome thanks heaps