My package looks like this:
┌ tsconfig.json
├ src/
│ ├ index.ts (import './dependence.ts')
│ └ dependence.ts
└ example/
├ index.html
└ script.ts (import '../src/index.ts')
I would like
./src/*.ts
to be compiled in./dist/*.js
./example/*.ts
to be compiled in./example/*.js
after running tsc
, I expect my package to look like this:
┌ tsconfig.json
├ src/
│ ├ index.ts (import './dependence.ts')
│ └ dependence.ts
├!dist/
│ ├!index.js (import './dependence.js')
│ └!dependence.js
└ example/
├ index.html
├ script.ts (import '../src/index.ts')
└!script.js (import '../dist/index.js')
I'm a little confused about all tsconfig options.
I have tried many things with options like baseUrl
, paths
, rootDir
, outDir
, rootDirs
, ... without success.