-
Notifications
You must be signed in to change notification settings - Fork 106
/
webpack.config.js
37 lines (36 loc) · 1.11 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
// Configuration file of webpack
var path = require("path");
var webpack = require("webpack");
var BowerWebpackPlugin = require("bower-webpack-plugin");
var pkg = require(path.join(__dirname, "package.json"));
var dirs = pkg.configs.directories;
var version = process.env.VERSION || pkg.version;
var banner = pkg.name + " v" + version + "\n" +
"(c) " + new Date().getFullYear() +
" " + pkg.author.name + "\n" +
"Released under the " + pkg.license + " License.";
module.exports = {
entry: {
"vue-html-editor": path.join(__dirname, dirs.src, "vue-html-editor.js")
},
resolve: {
root: [__dirname],
modulesDirectories: [ "lib" ]
},
plugins: [
new webpack.optimize.DedupePlugin(),
new BowerWebpackPlugin({
modulesDirectories: [ "lib" ],
manifestFiles: "bower.json",
includes: /.*/,
excludes: [],
searchResolveModulesDirectories: true
}),
new webpack.BannerPlugin(banner)
],
output: {
path: path.join(__dirname, dirs.dist),
filename: "[name].js",
sourceMapFilename: "[file].map"
}
};