Skip to content

Tree-shaking does not work for Hyntax modules #42

@mykolaharmash

Description

@mykolaharmash

See this issue for more context.

Parcel and other bundlers seams to bundle polyfills for Node.js streams even when Hyntax stream modules are not imported to the user's code. e.g. this code:

const { tokenize, constructTree } = require('hyntax')

will result in Stream polyfill in the bundle.

As a workaround user can import from individual files:

const tokenize = require('hyntax/lib/tokenize')
const constructTree = require('hyntax/lib/construct-tree')

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions