Last active
August 29, 2015 14:07
-
-
Save zsitro/fe732c9afe3ef74b135b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('./content.js') | |
console.log("entry.") | |
# 1.bundle.js | |
require.ensure ["./input.coffee", "./module-b.coffee"], (require) -> | |
a = require("./module-b.coffee"); | |
# 2.bundle.js | |
require.ensure ["./input-2.coffee", "./module-c.coffee", "./module-b.coffee"], (require) -> | |
a = require("./module-c.coffee"); | |
as = require("./module-b.coffee"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var CommonsChunkPlugin = require("webpack/lib/optimize/CommonsChunkPlugin"); | |
module.exports = { | |
entry: "./entry.coffee", | |
output: { | |
path: __dirname, | |
filename: "bundle.js" | |
}, | |
module: { | |
loaders: [ | |
{ test: /\.css$/, loader: "style!css" }, | |
{ test: /\.coffee$/, loader: "coffee-loader" }, | |
{ test: /\.(coffee\.md|litcoffee)$/, loader: "coffee-loader?literate" } | |
] | |
}, | |
plugins: [ | |
new CommonsChunkPlugin("commons.chunk.js") | |
] | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment