Skip to content

Commit 0a67b61

Browse files
committed
added banner plugin
1 parent 5bf35d3 commit 0a67b61

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"url": "https://github.com/jbaysolutions/vue-grid-layout.git"
1818
},
1919
"author": "Gustavo Santos (JBay Solutions) <[email protected]> (http://www.jbaysolutions.com)",
20+
"homepage": "https://github.com/jbaysolutions/vue-grid-layout",
2021
"main": "dist/vue-grid-layout.common.js",
2122
"unpkg": "dist/vue-grid-layout.umd.min.js",
2223
"scripts": {

vue.config.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
1+
// https://medium.com/js-dojo/how-to-reduce-your-vue-js-bundle-size-with-webpack-3145bf5019b7
12
// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
3+
const webpack = require('webpack');
4+
const PACKAGE = require('./package.json');
5+
6+
const banner = PACKAGE.name + ' - ' + PACKAGE.version + ' | ' +
7+
'(c) 2015, ' + new Date().getFullYear() + ' ' + PACKAGE.author + ' | ' +
8+
PACKAGE.homepage;
29

310
module.exports = {
411
configureWebpack: {
512
output: {
613
library: "VueGridLayout",
714
libraryExport: 'default'
815
},
9-
// https://medium.com/js-dojo/how-to-reduce-your-vue-js-bundle-size-with-webpack-3145bf5019b7
10-
// plugins: [new BundleAnalyzerPlugin()],
16+
plugins: [
17+
// new BundleAnalyzerPlugin(),
18+
new webpack.BannerPlugin(banner)
19+
],
1120
},
1221
css: {
1322
extract: false

0 commit comments

Comments
 (0)