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

build: use babel and create cjs bundle #44

Merged
merged 1 commit into from
May 11, 2022
Merged

build: use babel and create cjs bundle #44

merged 1 commit into from
May 11, 2022

Conversation

luqven
Copy link
Contributor

@luqven luqven commented May 11, 2022

  • This PR uses babel to transpile the code into more compatible JS syntax.
  • It also changes the rollup config to create a .cjs bundle for users who need CJS compact.

@luqven luqven self-assigned this May 11, 2022
@luqven luqven marked this pull request as ready for review May 11, 2022 18:39
Comment on lines +17 to +24
"files": [
"/dist",
"/src",
"README.md",
"CHANGELOG.md",
"LICENSE",
"custom-elements.json"
],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only include relevant files in package, IE "ignore" tests/ etc.

Comment on lines +17 to +19
const devMode = process.env.NODE_ENV === 'development';
console.log(`${devMode ? 'development' : 'production'} mode bundle`);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very basic logging for NODE_ENV. It makes it easier to tell which type of bundle is being served during development.

Copy link

@gmp gmp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues from me. Let me know when this is published and I'll work it into blog

@luqven luqven merged commit 400135a into next May 11, 2022
@luqven luqven deleted the l/cjs-undle branch May 11, 2022 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants