Skip to content

Support for export specifiers? #15

Open
@javamonn

Description

@javamonn

It appears like workerize-loader only supports moving export declarations in the target module into a worker. I'm attempting to use it with Bucklescript, which compiles modules down to an export specifier list, i.e. export { foo, bar, } instead of export declarations.

I took a pass at implementing this and couldn't get around Webpack declaring its own parser plugin and bailing on export specifier, I think for tree-shaking purposes. I don't have much experience with Webpack plugins though and it seems like there should be a way to get this to work. Are there any alternate approaches you can suggest, or maybe workarounds?

One other thought I had for my purposes would be to instead compile to commonjs and tweak workerize so that it would accept the pre-compiled source instead of doing the current find-and-replace compilation step.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions