8000 GitHub · Where software is built 8000
[go: up one dir, main page]

Skip to content
I tried your config and it works, resulting html has prefetch and preload links. I myself have config which preloads fonts and prefetches js and css and it works. Perhaps something else doesn't work in yout case. Are you using version 2? #35
Open
@caiziran

Description

@caiziran
          I tried your config and it works, resulting html has prefetch and preload links. I myself have config which preloads fonts and prefetches js and css and it works. Perhaps something else doesn't work in yout case. Are you using version 2?
     new PreloadWebpackPlugin({
        rel: 'preload',
        as(entry) {
          if (/\.(woff(2)?)(\?v=[0-9]\.[0-9]\.[0-9])?$/.test(entry)) {
            return 'font';
          }
        },
        fileWhitelist: [/\.(woff(2)?)(\?v=[0-9]\.[0-9]\.[0-9])?$/],
        include: 'allAssets'
      }),
      new PreloadWebpackPlugin({
        rel: 'prefetch',
      }),

Originally posted by @lkarmelo in #22 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0