Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

[rollup example] can not import .ts file #29

Closed
lili21 opened this issue Dec 5, 2018 · 3 comments
Closed

[rollup example] can not import .ts file #29

lili21 opened this issue Dec 5, 2018 · 3 comments

Comments

@lili21
Copy link

lili21 commented Dec 5, 2018

Think about file directory like this,

- src
  - index.ts
  - module-a.ts

and the source code

// index.ts

import a from './module-a'

this will break rollup .

@a-tarasyuk
Copy link
Contributor

@lili21 Thanks. You can check the updated version here. README will be updated after merge PR #30

@lili21
Copy link
Author

lili21 commented Dec 7, 2018

external option should be specified I guess. Cause rollup-plugin-node-resolve will bundle third party modules.

@a-tarasyuk
Copy link
Contributor

@lili21 Actually, this example does not have any external modules. It is the good starting point to see how to use Babel and TypeScript with Rollup., You can extend Rollup config based on your requirements, add external, globals options or any other Rollup plugins. Anyway, I added these options and links to Rollup docs, in order to avoid confusion. Thanks.

DrSensor added a commit to DrSensor/bot-byte that referenced this issue Feb 4, 2019
- [npm start] remove typescript declaration file
- [npm start] use babel with typescript preset
- [npm build] use typescript compiler

references:
- rollup/rollup-plugin-babel#255
- rollup/rollup-plugin-typescript#129
- rollup/rollup-plugin-babel#271
- rollup/rollup-plugin-babel#279
- microsoft/TypeScript-Babel-Starter#29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants