Skip to content

Code Spliting #65

Closed
Closed
@cgarvis

Description

@cgarvis

Webpack 2 documentation on this topic has not been written as of this writing, but it hasn't changed from Webpack 1 to much.

var webpack = require("webpack");

module.exports = {
  entry: {
    app: "./app.js",
    vendor: ["jquery", "underscore", ...],
  },
  output: {
    filename: "bundle.js"
  },
  plugins: [
    new webpack.optimize.CommonsChunkPlugin(/* chunkName= */"vendor", /* filename= */"vendor.bundle.js")
  ]
}

Source: https://webpack.github.io/docs/code-splitting.html#split-app-and-vendor-code

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