Git Product home page Git Product logo

webpack's Introduction

dillPlugin 动态链接库(webpack 内置的)

优化打包速度 对运行速度没有帮助

如何打包第三方库

dll 功能在开发之前,抽离好,打好包 暂时存在个小问题

tree-shaking(webpack 内置的)

  • 默认只支持 es6 的树摇晃,去除没有用的代码
  • 去除没有用的文件(副作用) // "sideEffects":true //但是会有额外的副作用 ==> // "sideEffects":['**/*.css']
  • 只在生产环境下被调用 // optimization: { usedExports:true } //提示的作用
  • 静态导入 //import {} from 'xxx' ; 动态的 //require ('xxx')

scope-hoisting(webpack 内置的)

只在生产环境下 1) 减少作用域 2) 预计算

webpack's People

Contributors

hazelnuttt avatar

Watchers

James Cloos avatar  avatar

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.