-
Notifications
You must be signed in to change notification settings - Fork 112
/
webpack.config.dist.js
36 lines (34 loc) · 1.09 KB
/
webpack.config.dist.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
var path = require('path'),
libPath = path.join(__dirname, 'lib'),
distPath = path.join(__dirname, 'dist'),
webpack = require("webpack"),
pkg = require('./package.json'),
fs = require('fs'),
copyright = fs.readFileSync('./copyright.txt', 'utf8'),
HtmlWebpackPlugin = require('html-webpack-plugin');
copyright = copyright.replace('{pkg.name}', pkg.name)
.replace('{pkg.description}', pkg.description)
.replace('{pkg.version}', pkg.version)
.replace('{pkg.author}', pkg.author)
.replace('{pkg.homepage}', pkg.homepage)
.replace('{pkg.license}', pkg.license);
module.exports = {
entry: path.join(libPath, 'index.js'),
output: {
path: distPath,
library: 'ionicNativeTransitions',
libraryTarget: "umd",
umdNamedDefine: true,
filename: 'ionic-native-transitions.js'
},
module: {
loaders: [{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
loader: "ng-annotate?add=true!babel"
}]
},
plugins: [
new webpack.BannerPlugin(copyright)
]
};