TypeScript compiler needs to be configured to output ES6 module by setting --module es6 or the equivalent tsconfig.json compilerOptions parameter. Since tsc --build does not accept compiler options flags, we need to duplicate some of the configuration: - specify separate output folder for ES6 module files (new tsconfig.esm.json file) - add "module" field for ES6 module (esm) output files to package.json Hence, a script `scripts/sync-esm-config.js` was added to automate this process.
15 lines
288 B
JSON
15 lines
288 B
JSON
{
|
|
"name": "@rondo/client",
|
|
"private": true,
|
|
"peerDependencies": {
|
|
"axios": "^0.18.0",
|
|
"react": "^16.7.0",
|
|
"react-dom": "^16.7.0",
|
|
"react-redux": "^6.0.0",
|
|
"redux": "^4.0.1"
|
|
},
|
|
"main": "lib/index.js",
|
|
"types": "lib/index.d.ts",
|
|
"module": "esm/index.js"
|
|
}
|