Skip to content

Plugin doesn't recompile rust code on change, because watchpack never triggers 'aggregate' event #133

@MaxchilKH

Description

@MaxchilKH

@wasm-tool/wasm-pack-plugin@1.6.0 doesn't recompile on Rust source code change, which is expected, because Watchpack never triggers 'aggregate' event.

Form what i understand it's happening because according to Watchpacks readme it's not going to trigger one if aggregateTimeout is undefined, but the plugin creates an instance without any options specified.

One possible solution is to move watchpacks initialization into apply and pass it watchOptions from the config. That would also solve issues like #130 and potential issues with setups requiring polling.

$ wasm-pack  --version
wasm-pack 0.10.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions