wasm-tool / rust-plugin

Rust plugin for Webpack
MIT License
13 stars 1 forks source link

Allow configuring whether `wasm-opt` is required or not #2

Closed fitzgen closed 6 years ago

fitzgen commented 6 years ago

In some situations it makes sense to only run wasm-opt if it is available, in others it makes sense to require that it is present and make it a fatal error when it is missing. We should have a flag in the config options to control this behavior.

xtuc commented 6 years ago

Ok, what should be the configuration?

Maybe something like:

new RustPlugin({
    wasmopt: {
        required: true
    }
})
fitzgen commented 6 years ago

Looks perfect!