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

fix(core): esbuild with cjs, fixes #115 #116

Merged
merged 1 commit into from
Jan 22, 2024
Merged

fix(core): esbuild with cjs, fixes #115 #116

merged 1 commit into from
Jan 22, 2024

Conversation

JamesKyburz
Copy link
Contributor

@JamesKyburz JamesKyburz commented Jan 20, 2024

Description

The previous output of core was esm, but as the file is .js and no type module or exports are present in package.json both require and import fail.

Changing the format to cjs fixes the issue, the size of dist isn't any larger. That said if we're using esbuild with sourcemaps we could minify to get a much smaller payload?

I chose cjs instead of esm + type module because the esm output from esbuild didn't work with lodash.

Motivation and Context

Fixes #115.

How Has This Been Tested?

Yes.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING.md document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@eoinsha eoinsha merged commit fd406c7 into fourTheorem:main Jan 22, 2024
1 of 3 checks passed
@JamesKyburz JamesKyburz deleted the fix/core-dist branch January 23, 2024 12:12
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.

can't use slic-watch-core without a bundler
2 participants