Wasm-pack: --out flag that allows configuration of `./pkg` dir

Created on 28 Jul 2018  路  5Comments  路  Source: rustwasm/wasm-pack

This is a feature request; I would like to configure the output directory (currently hardcoded to ./pkg).

When Webpack invokes wasm-pack in the root of the project it will create the ./pkg directory. Unlike the normal wasm-pack's use case we won't publish it and don't .gitignore it.

I would like to avoid generating the intermediate files in the user's repository but rather in a temporary fs, where Webpack will be able to bundle it anyway.

PR attached feature request help wanted to-do

Most helpful comment

I wouldn't mind taking this one! I'll start looking into it, and will follow up if I have any other questions :)

All 5 comments

I wouldn't mind taking this one! I'll start looking into it, and will follow up if I have any other questions :)

go for it @data-pup that'd be awesome!

In #263, I'm pretty close to a complete solution. What should be printed here? I could imagine writing the absolute path, or trying to use a nicer looking relative path.

Additionally: there is a lot of language in the app that references "pkg". Since this may not always be the case anymore, it might be worthwhile saying "target directory" or something like that.

image

I could imagine writing the absolute path, or trying to use a nicer looking relative path.

Either one sounds good to me.

Fixed in #263

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Outpox picture Outpox  路  4Comments

netgusto picture netgusto  路  4Comments

arthmis picture arthmis  路  5Comments

mikedilger picture mikedilger  路  3Comments

ashleygwilliams picture ashleygwilliams  路  3Comments