marko-js / vite

A Marko plugin for Vite
MIT License
55 stars 8 forks source link

feat: support other plugins adding assets, remove store config option #99

Closed DylanPiercey closed 11 months ago

DylanPiercey commented 11 months ago

Description

Exposes an api where other vite plugins can add additional assets to Marko server entries. Currently this is used by arc-vite (see https://github.com/marko-js/arc-vite/blob/aa809ee9abf08c84866a47ec70b9bcbfd8f867a5/src/plugins/build-ssr.ts#L27-L33)

BREAKING CHANGE: Removes the options.store to this plugin, since we now have a better way to handle the ssr/web build handoff.

changeset-bot[bot] commented 11 months ago

🦋 Changeset detected

Latest commit: 1fbfbb34e99bbe156139c969c8e2e3e55187f343

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ----------- | ----- | | @marko/vite | Major |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

codecov[bot] commented 11 months ago

Codecov Report

Attention: 15 lines in your changes are missing coverage. Please review.

Comparison is base (d6dfb1f) 77.21% compared to head (1fbfbb3) 74.59%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #99 +/- ## ========================================== - Coverage 77.21% 74.59% -2.62% ========================================== Files 11 10 -1 Lines 588 248 -340 Branches 135 48 -87 ========================================== - Hits 454 185 -269 + Misses 84 45 -39 + Partials 50 18 -32 ``` | [Files](https://app.codecov.io/gh/marko-js/vite/pull/99?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=marko-js) | Coverage Δ | | |---|---|---| | [src/babel-plugin-cjs-interop.ts](https://app.codecov.io/gh/marko-js/vite/pull/99?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=marko-js#diff-c3JjL2JhYmVsLXBsdWdpbi1janMtaW50ZXJvcC50cw==) | `74.07% <100.00%> (ø)` | | | [src/esbuild-plugin.ts](https://app.codecov.io/gh/marko-js/vite/pull/99?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=marko-js#diff-c3JjL2VzYnVpbGQtcGx1Z2luLnRz) | `50.00% <100.00%> (ø)` | | | [src/index.ts](https://app.codecov.io/gh/marko-js/vite/pull/99?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=marko-js#diff-c3JjL2luZGV4LnRz) | `88.88% <ø> (+13.30%)` | :arrow_up: | | [src/manifest-generator.ts](https://app.codecov.io/gh/marko-js/vite/pull/99?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=marko-js#diff-c3JjL21hbmlmZXN0LWdlbmVyYXRvci50cw==) | `95.23% <100.00%> (ø)` | | | [src/render-assets-transform.ts](https://app.codecov.io/gh/marko-js/vite/pull/99?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=marko-js#diff-c3JjL3JlbmRlci1hc3NldHMtdHJhbnNmb3JtLnRz) | `100.00% <ø> (ø)` | | | [src/resolve.ts](https://app.codecov.io/gh/marko-js/vite/pull/99?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=marko-js#diff-c3JjL3Jlc29sdmUudHM=) | `78.12% <ø> (ø)` | | | [src/server-entry-template.ts](https://app.codecov.io/gh/marko-js/vite/pull/99?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=marko-js#diff-c3JjL3NlcnZlci1lbnRyeS10ZW1wbGF0ZS50cw==) | `100.00% <100.00%> (+14.28%)` | :arrow_up: | | [src/serializer.ts](https://app.codecov.io/gh/marko-js/vite/pull/99?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=marko-js#diff-c3JjL3NlcmlhbGl6ZXIudHM=) | `72.41% <50.00%> (ø)` | | | [src/render-assets-runtime.ts](https://app.codecov.io/gh/marko-js/vite/pull/99?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=marko-js#diff-c3JjL3JlbmRlci1hc3NldHMtcnVudGltZS50cw==) | `71.42% <71.42%> (ø)` | | | [src/read-once-persisted-store.ts](https://app.codecov.io/gh/marko-js/vite/pull/99?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=marko-js#diff-c3JjL3JlYWQtb25jZS1wZXJzaXN0ZWQtc3RvcmUudHM=) | `57.14% <57.14%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.