-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
58 lines (56 loc) · 1.65 KB
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
var path = require("path");
var webpack = require("webpack");
module.exports = {
cache: true,
entry: {
ContentManager: "./src/content-manager.coffee",
IframeContent: "./src/iframe-content.coffee",
FeedContent: "./src/feed-content.coffee",
YoutubeContent: "./src/youtube-content.coffee",
BambooContent: "./src/bamboo-content.coffee",
JenkinsContent: "./src/jenkins-content.coffee",
SmokeMonsterContent: "./src/smoke-monster-content.coffee",
TwitterContent: "./src/smoke-monster-content.coffee",
ImageContent: "./src/image-content.coffee"
},
output: {
path: path.join(__dirname, "lib"),
publicPath: "lib/",
filename: "[name].js",
chunkFilename: "[chunkhash].js",
// export itself to a global var
libraryTarget: "var",
// name of the global var
library: "[name]"
//filename: "MyLibrary.[name].js",
//library: ["MyLibrary", "[name]"],
},
externals: {
// require("jquery") is external and available
// on the global var jQuery
"jquery": "jQuery"
},
module: {
loaders: [
// required to write "require('./style.css')"
//{ test: /\.css$/, loader: "style-loader!css-loader" },
{ test: /\.coffee$/, loader: "coffee-loader" },
{ test: /\.(coffee\.md|litcoffee)$/, loader: "coffee-loader?literate" }
]
},
resolve: {
alias: {
// Bind version of jquery
jquery: "jquery"
}
},
plugins: [
new webpack.ProvidePlugin({
// Automtically detect jQuery and $ as free var in modules
// and inject the jquery library
// This is required by many jquery plugins
jQuery: "jquery",
$: "jquery"
})
]
};