Git Product home page Git Product logo

Comments (3)

kaierrao avatar kaierrao commented on June 9, 2024 1

vue配置chunks:all,把js包含进来 。

pages: {
index: {
entry: "src/main.js",
template: "public/index.html",
filename: "index.html",
chunks:'all'
},

from vue-cli3-samples.

suyi91 avatar suyi91 commented on June 9, 2024

打包出来有很多preload
···

··· 网上所有的解决办法都失效了,博主可以良计?

vue-cli3 提供了inspect 可以输出实际的Webpack配置,可以看到preloadprefetch

/* config.plugin('preload') */
    new PreloadPlugin(
      {
        rel: 'preload',
        include: 'initial',
        fileBlacklist: [
          /\.map$/,
          /hot-update\.js$/
        ]
      }
    ),
    /* config.plugin('prefetch') */
    new PreloadPlugin(
      {
        rel: 'prefetch',
        include: 'asyncChunks'
      }
    ),

去除preload只需在vue.config.js配置chainWebpack属性就行了

chainWebpack: config => {
    config.plugins.delete('preload')
  }

from vue-cli3-samples.

weituotian avatar weituotian commented on June 9, 2024

解决了,多谢博主

from vue-cli3-samples.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.