ProjectEvergreen / greenwood

Greenwood is your full-stack workbench for the web, focused on supporting modern web standards and development to help you create your next project.
https://www.greenwoodjs.io
MIT License
95 stars 9 forks source link

bug/issue 1151 custom imports not working for API routes and SSR pages #1152

Closed thescientist13 closed 9 months ago

thescientist13 commented 10 months ago

Related Issue

resolves #1151

Summary of Changes

  1. Added support for using custom imports for CSS and JS with test cases
  2. Vendor @web/rollup-plugin-import-meta-assets plugin
  3. Added support for bundling new URL for script assets

TODO

  1. [x] Lit tests are failing?
  2. [x] Windows specs are failing
  3. [x] Refactor import meta assets dependency / dependency
    • estree -> acorn walk?
    • Magic String?
    • remove dep from package.json / rollup.config.js
  4. [x] refactoring / TODOs
    • why do we have to make an /api/assets folder? (already fixed in 0.29.0-rc.1)
    • "common" plugins are being duplicated? including common plugins?
  5. [x] clean up console logging
  6. [x] Document usage of new URL for assets (plus move TS test case to CLI) - https://github.com/ProjectEvergreen/greenwood/issues/1163
    • hmm, how to best handle for nested routes (e.g. /some-path)?

Thoughts / Questions

  1. [x] need to support more than just JS for emitting chunks in import meta assets?
  2. [x] loader imports bug seen from the reproduction (should track as own issue) - https://github.com/ProjectEvergreen/greenwood/issues/1161