Crate in sub directory causes pkg to be created in the root.
Closed this issue · 1 comments
GeraldHost commented
This may be intended behaviour and I'm missing something so apologies if that is the case.
When I nest my rust code in a subdirectory an run a build. A pkg
directory is created in the root of my project with an empty index.js
file in it. Everything else is working as expected, a pkg
folder still gets created in my rust subdirectory and I can consume the index.js
from there as expected.
Steps to Reproduce
npm init rust-webpack my-app
cd my-app && mkdir rust
mv src tests Cargo.toml rust
- Update your webpack
WasmPackPlugin
crateDirectory
topath.resolve(__dirname, 'rust')
npm run build
- you will see that a
pkg
with an emptyindex.js
file has been created in the root.
Expected Behavior
It shouldn't create the pkg
folder in the root.
GeraldHost commented
Closing as this is not the right place for this.
This is: wasm-tool/wasm-pack-plugin#87