Skip to content

Bundling source files in npm package #4596

@RedCMD

Description

@RedCMD

Problem

Why are we bundling all the source files in the web-tree-sitter npm package?
are they actually needed?

v2.24.7 is 372kB containing 6 files
https://www.npmjs.com/package/web-tree-sitter/v/0.24.7?activeTab=code

v2.25.0 is 5.78mb containing ~50 files
https://www.npmjs.com/package/web-tree-sitter/v/0.25.0?activeTab=code

a bunch of the src files even have errors
which is rather annoying if TS finds them
Image
Image
Image
Image

Steps to reproduce

https://www.npmjs.com/package/web-tree-sitter/v/0.25.0?activeTab=code

Expected behavior

For the npm package to only ship necessary files

Tree-sitter version (tree-sitter --version)

tree-sitter 0.25.7

Operating system/version

Windows 11

Metadata

Metadata

Assignees

No one assigned

    Labels

    bindings:webgood-first-issueGood issues for first-time contributors wanting to help out

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions