marko-js / vite

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

feat: optimize marko deps #15

Closed Aslemammad closed 2 years ago

Aslemammad commented 2 years ago

Resolves #12 This PR tries to enables optimizing deps (vite) on marko files through bringing an esbuild plugin and add .marko extension to optimizeDeps option. Tried with @marko-tags/match-media and it works well!

linux-foundation-easycla[bot] commented 2 years ago

CLA Signed

The committers listed above are authorized under a signed CLA.

codecov[bot] commented 2 years ago

Codecov Report

Merging #15 (1cb3172) into main (5e7b69b) will decrease coverage by 4.38%. The diff coverage is 56.52%.

@@            Coverage Diff             @@
##             main      #15      +/-   ##
==========================================
- Coverage   87.85%   83.47%   -4.39%     
==========================================
  Files           5        6       +1     
  Lines         313      345      +32     
  Branches       81       89       +8     
==========================================
+ Hits          275      288      +13     
- Misses         32       49      +17     
- Partials        6        8       +2     
Impacted Files Coverage Δ
src/esbuild-plugin.ts 38.70% <38.70%> (ø)
src/index.ts 88.93% <93.33%> (+0.04%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 5e7b69b...1cb3172. Read the comment docs.

DylanPiercey commented 2 years ago

There's still work to be done to allow cjs files in SSR since it doesn't go through the optimize deps flow, however I do think what is in here is still valuable as a standalone contribution. We can tackle cjs SSR in a follow up.

github-actions[bot] commented 2 years ago

:tada: This PR is included in version 2.3.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: