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(meta): merge head at runtime #363

Merged
merged 9 commits into from
Oct 6, 2020
Merged

feat(meta): merge head at runtime #363

merged 9 commits into from
Oct 6, 2020

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Oct 6, 2020

For a long time, we had to always add @nuxtjs/pwa for production to fill options.meta (providing icons, etc).

This refactor, exports .nuxt/pwa/meta.json file which is merged at runtime using a nuxt plugin with user provided head. Also SPA meta support (+ static 200.html ) is preserved by loading same json file and using same merging strategy.

Note: Users using ssr: false in production mode, have to still use modules instead of buildModules

Fixes #341

@pi0 pi0 changed the title feat(meta): runtime support feat(meta): merge meta at runtime Oct 6, 2020
@codecov
Copy link

codecov bot commented Oct 6, 2020

Codecov Report

Merging #363 into master will decrease coverage by 4.97%.
The diff coverage is 65.45%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #363      +/-   ##
==========================================
- Coverage   84.82%   79.84%   -4.98%     
==========================================
  Files          10       11       +1     
  Lines         369      387      +18     
  Branches      109      115       +6     
==========================================
- Hits          313      309       -4     
- Misses         52       66      +14     
- Partials        4       12       +8     
Impacted Files Coverage Δ
lib/utils/index.js 88.46% <ø> (-0.83%) ⬇️
lib/meta/meta.merge.js 4.54% <4.54%> (ø)
lib/meta/module.js 79.09% <79.74%> (-1.68%) ⬇️
lib/manifest/module.js 93.10% <83.33%> (+1.92%) ⬆️
lib/icon/module.js 93.18% <100.00%> (+0.87%) ⬆️

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 a18a79f...fa30ecf. Read the comment docs.

@pi0 pi0 changed the title feat(meta): merge meta at runtime feat(meta): merge head at runtime Oct 6, 2020
@pi0 pi0 merged commit c0d86ea into master Oct 6, 2020
@pi0 pi0 deleted the feat/persist-meta branch October 6, 2020 14:41
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.

[WARN] You are using a low quality icon, use icon png
1 participant