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

fix(webpack): fix production font preloading #5436

Merged
merged 10 commits into from
Apr 20, 2019
Merged

Conversation

clarkdo
Copy link
Member

@clarkdo clarkdo commented Apr 1, 2019

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

In production, App.js js is concatenated by webpack, so there is no App.js module info
in client.manifest.json.

Way to preload fonts if anyone is interested in verifying the issue:

    bundleRenderer: {
      shouldPreload: (file, type) => {
        return ['script', 'style', 'font'].includes(type)
      }
    }

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly. (PR: #)
  • I have added tests to cover my changes (if not applicable, please state why)
  • All new and existing tests are passing.

@clarkdo clarkdo requested review from pi0 and aldarund April 1, 2019 16:50
@codecov-io
Copy link

codecov-io commented Apr 1, 2019

Codecov Report

Merging #5436 into dev will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #5436      +/-   ##
==========================================
+ Coverage   95.68%   95.69%   +<.01%     
==========================================
  Files          78       78              
  Lines        2595     2600       +5     
  Branches      661      663       +2     
==========================================
+ Hits         2483     2488       +5     
  Misses         93       93              
  Partials       19       19
Impacted Files Coverage Δ
packages/webpack/src/plugins/vue/client.js 95% <100%> (+0.71%) ⬆️

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 1652696...c010e21. Read the comment docs.

@pi0 pi0 changed the title fix: unable to preload font files in prod mode fix(webpack): fix production font preloading Apr 1, 2019
@pi0 pi0 added the 🕐Pending label Apr 1, 2019
@clarkdo clarkdo closed this Apr 2, 2019
@clarkdo clarkdo deleted the prod-preload branch April 2, 2019 13:12
@clarkdo clarkdo restored the prod-preload branch April 4, 2019 09:22
@clarkdo clarkdo reopened this Apr 4, 2019
@atinux atinux self-requested a review April 5, 2019 13:03
@clarkdo clarkdo merged commit aea9db6 into nuxt:dev Apr 20, 2019
@clarkdo
Copy link
Member Author

clarkdo commented Apr 20, 2019

Since the pr in Vue repo is no luck for 3 weeks, so let's merge this.

@clarkdo clarkdo deleted the prod-preload branch April 20, 2019 12:06
@clarkdo clarkdo removed the pending label Apr 20, 2019
pi0 pushed a commit that referenced this pull request Apr 21, 2019
@pi0 pi0 mentioned this pull request Apr 21, 2019
@danielroe danielroe added the 2.x label Jan 18, 2023
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.

None yet

8 participants