Skip to content

v0.4.0 - Deep Package Support!

Compare
Choose a tag to compare
@FredKSchott FredKSchott released this 20 Mar 16:34

Thanks to the hard work of our new contributor @Birch-san, we now have Deep Package Support (aka installing specific files from within a package)! See this new code snippet in the README:

  "dependencies": { "htm": "^1.0.0", "preact": "^8.0.0", /* ... */ },
  "@pika/web": {
    "webDependencies": [
      "htm",
      "preact",
      "preact/hooks", // A package within a package
      "unistore/full/preact.es.js" // An ESM file within a package
    ]
  },

This does involve a small breaking change for anyone who was using a scoped package: We had previously reformatted scoped package names to replace the / with --. This gave us a flat web_modules directory, but the feedback was almost universally "wtf why?". In v0.4.0, scoped package names are now installed untouched:

 preact -> web_modules/preact.js
-@pika/fetch -> web_modules/@pika--fetch.js
+@pika/fetch -> web_modules/@pika/fetch.js
 preact/hooks -> web_modules/preact/hooks.js
 unistore/full/preact.es.js -> web_modules/unistore/full/preact.es.js

Finally, another big thanks to @Birch-san for his thoughtful work on this release along with anyone who contributed the Issues, PRs, or our new Spectrum community.