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

Use rollup with babel to allow tree-shaking #14

Merged
merged 3 commits into from Jun 4, 2019

Conversation

Projects
None yet
2 participants
@nhardy
Copy link
Contributor

commented Jun 3, 2019

Addresses #13, and also cleans up inconsistent quoting and indentation according to .editorconfig.

Key differences are located at:

  • config/generateBabelConfig.js - babel config including babel-plugin-lodash which automatically uses cherry-picked imports for lodash
  • babel-register.js - allows rollup.config.ts to be written in TypeScript
  • babel.config.js - like .babelrc.js but for monorepos
  • tsconfig.json - This file has been modified so that by default everything is included and TypeScript will not emit
  • packages/kerosene/config/tsconfig.json - This tsconfig is used to emit declarations only
  • packages/kerosene/src/index.ts - exports have been converted to named exports to allow for tree-shaking
  • packages/kerosene/babel.config.js - needed for rollup.config.ts for some reason
  • packages/kerosene/rollup.config.ts - Configuration for rollup builds
  • packages/kerosene/rollup.config.js - loads babel-register.js and then rollup.config.ts
  • packages/kerosene/package.json - split task for build and typings
  • typings/rollup-plugin-babel.d.ts - basic type definition for rollup-plugin-babel
  • package.json - new clean task for all packages
@ojkelly

ojkelly approved these changes Jun 4, 2019

@ojkelly ojkelly merged commit 18b4998 into master Jun 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.