Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: optimize marko deps #15

Merged
merged 2 commits into from Apr 30, 2022

Conversation

Aslemammad
Copy link
Contributor

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
Copy link

linux-foundation-easycla bot commented Apr 25, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: Aslemammad / name: M. Bagher Abiat (773b6e7)

@codecov
Copy link

codecov bot commented Apr 25, 2022

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%) ⬆️

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
Copy link
Contributor

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.

@DylanPiercey DylanPiercey merged commit 1b36765 into marko-js:main Apr 30, 2022
@github-actions
Copy link
Contributor

🎉 This PR is included in version 2.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@Aslemammad Aslemammad deleted the optimize-marko-deps branch May 1, 2022 06:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Marko node_module packages with commonjs dependencies.
2 participants