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

perf: parallelise all async calls #679

Merged
merged 19 commits into from
Jun 13, 2023
Merged

perf: parallelise all async calls #679

merged 19 commits into from
Jun 13, 2023

Conversation

ineshbose
Copy link
Collaborator

@ineshbose ineshbose commented May 15, 2023

  • about ~15-20% faster build (tested in my use cases, can go up for 30-50% as noted in CI) 🔥
  • functional programming to ensure no side-effects ⚙️
  • splits & organises files for easier development in future 📦
  • provides hook for each loaded config 👁️
  • drops requireModule for await import() (also parallelised) 🚢

@nuxt-studio
Copy link

nuxt-studio bot commented May 16, 2023

Live Preview ready!

Name Edit Preview Latest Commit
TailwindCSS Edit on Studio ↗︎ View Live Preview a49bdb3

configPaths.map(async (configPath, idx, paths) => {
let _tailwindConfig: Partial<TWConfig> | undefined
try {
_tailwindConfig = await import(configPath).then(c => c.default || c)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can append .catch block but not required

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Causing issues in build when TS config is imported into module.mjs

src/viewer.ts Outdated Show resolved Hide resolved
@ineshbose ineshbose marked this pull request as ready for review May 17, 2023 09:31
src/viewer.ts Outdated Show resolved Hide resolved
@atinux atinux merged commit 5502765 into nuxt-modules:main Jun 13, 2023
atinux added a commit that referenced this pull request Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants