Skip to content

Commit 587a828

Browse files
committed
chore(build): Add banner plugin
1 parent 05774f3 commit 587a828

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

build/webpack.release.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,15 @@ var utils = require('./utils')
55
var webpack = require("webpack")
66
var ExtractTextPlugin = require("extract-text-webpack-plugin")
77
var projectRoot = path.resolve(__dirname, '../')
8+
const npmCfg = require('../package.json')
89
// var cssLoader = ExtractTextPlugin.extract('style-loader', 'css-loader')
910

11+
var banner = [
12+
npmCfg.name + ' v' + npmCfg.version,
13+
'(c) ' + (new Date().getFullYear()) + ' ' + npmCfg.author,
14+
npmCfg.homepage
15+
].join('\n')
16+
1017
module.exports = {
1118
entry: {
1219
'vue-parallaxy': './src/index.js'
@@ -72,7 +79,8 @@ if (process.env.NODE_ENV === 'production') {
7279
warnings: false
7380
}
7481
}),
75-
new webpack.optimize.OccurenceOrderPlugin()
82+
new webpack.optimize.OccurenceOrderPlugin(),
83+
new webpack.BannerPlugin(banner)
7684
// new ExtractTextPlugin(utils.assetsPath('css/[name].[contenthash].css')),
7785
]
7886
}

0 commit comments

Comments
 (0)