Original Discussion: https://www.pika.dev/npm/snowpack/discuss/44
/cc @Monchi, @FredKSchott
@Monchi: As mentioned here, snowpack's babel plugin is getting complicated and need to be tested.
This ticket should probably start by investigating this tool from the Babel team for testing Babel plugins: https://github.com/babel-utils/babel-plugin-tester
@Monchi any interest in tackling this?
@FredKSchott Sure, assign me please :)
Thank you! Let me know if I can help in any way
I’ll work on this next Sunday
Hello @Monchi,
you may want to take a look at the configuration option: addVersion and the integration into the showpack-bin. If I configure it like:
[
"snowpack/assets/babel-plugin.js",
{ "optionalExtensions": true, "addVersion": true }
],
snowpack-bin is not longer capable of resolving the dependencies.
snowpack --include "dist/**/*.js" --dest dist/web_modules
â ¼ snowpack installing... preact.js?v=10.2.1
[0] ✖ Cannot find module 'preact.js?v=10.2.1'
@crra ah, that's a great point, we use --include on the post-babel built directory as well for Pika.dev. We should probably ignore/strip everything in the query param when we do import scanning.
PR submitted: https://github.com/pikapkg/snowpack/pull/161
Most helpful comment
@crra ah, that's a great point, we use
--includeon the post-babel built directory as well for Pika.dev. We should probably ignore/strip everything in the query param when we do import scanning.PR submitted: https://github.com/pikapkg/snowpack/pull/161