Giter Club home page Giter Club logo

vue-cli-plugin-dll's Introduction

This is a vue-cli 3.x plugin for webpack Dll-Plugin that can drastically improve build time performance. vue-cli-plugin-dll plugin register dll instruction to avoid adding extra webpack config file, it also insert DllReferencePlugin and inject chunk files automatically when you run dev/build directives.

English | 中文

Quick Start

Make sure you have the vue-cli 3.x.x version installed

$ vue -V

Install plugin

$ vue add dll

# OR

$vue invoke dll

Simple configuration

// vue.config.js

module.exports = {
  pluginOptions: {
    dll: {
      entry: ['vue', 'vue-route'],
      cacheFilePath: path.resolve(__dirname, './public'),
    },
  },
}

Execution

$ npm run dll

#OR

$ npx vue-cli-service dll

Configuration

Options

Parame Type Description Default Required
entry Object/Array/String entry vendor null true
open Boolean whether to add DllReferencePlugin plugin true false
output Object output false
output.path String The output directory as an absolute path 'yourProjectPath/public/dll' false
inject Boolean auto inject file to index.html true false
cacheFilePath String The path that save vender path 'yourProjectPath/node_modules/vue-cli-plugin-dll/src' false
format Boolean manifest json file (output) will be formatted false false

vue.config.js

module.exports = {
  // Other options...

  pluginOptions: {
    dll: {
      entry: ['vue'],

      /**
       * the directory path where the vendor files will be generated in
       * when running vue-cli-service dll
       */
      output: path.join(__dirname, './public/dll'),

      // If you only want to open `dll plugin` during production build,
      // you can use the following config:
      open: process.env.NODE_ENV === 'production',

      // !! Recommended configuration
      cacheFilePath: path.resolve(__dirname, './public'),
    },
  },
}

License

MIT

vue-cli-plugin-dll's People

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.