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: omit redundant yaml API extras #866

Merged
merged 2 commits into from
Jul 4, 2024

Conversation

antongolub
Copy link
Collaborator

  • Remove redundant (undocumented) YAML API extras
  • Override yaml pkg entry point from cjs to esm: reduce vendor bundle size by ~65Kb

Fixes #863

  • Tests pass
  • Appropriate changes to README are included in PR

@@ -64,6 +66,12 @@ const entryPoints = entry.includes('*')
const _bundle = bundle !== 'none' && !process.argv.includes('--no-bundle')
const _external = _bundle ? external.split(',') : undefined // https://github.com/evanw/esbuild/issues/1466

const plugins = [
esbuildResolvePlugin({
yaml: path.resolve(__dirname, '../node_modules/yaml/browser'),
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Workaround for eemeli/yaml#560

@antonmedv antonmedv merged commit d7d074d into google:main Jul 4, 2024
17 checks passed
This pull request was closed.
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.

YAML.parseAllDocuments is no longer accessible
2 participants