增加打包js header

This commit is contained in:
Julyp
2020-02-01 14:11:20 +08:00
parent 972fb3646e
commit a038f27329
6 changed files with 14 additions and 7 deletions

View File

@@ -1,5 +1,7 @@
const path = require('path');
const merge = require('webpack-merge');
const webpack = require("webpack");
const pkg = require('../package.json');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const {
@@ -11,6 +13,7 @@ const common = require('./webpack.common.js');
module.exports = merge(common, {
plugins: [
new CleanWebpackPlugin(),
new webpack.BannerPlugin(`smartTable v${pkg.version} | (c) pengyajun 2020 | Released under the MIT License.`),
new CopyWebpackPlugin([{
from: "examples/assets",
to: "assets"

View File

@@ -1,5 +1,7 @@
const path = require('path');
const merge = require('webpack-merge');
const webpack = require("webpack");
const pkg = require('../package.json');
const {
CleanWebpackPlugin
} = require('clean-webpack-plugin');
@@ -8,7 +10,8 @@ const common = require('./webpack.common.js');
module.exports = merge(common, {
plugins: [
new CleanWebpackPlugin()
new CleanWebpackPlugin(),
new webpack.BannerPlugin(`smartTable v${pkg.version} | (c) pengyajun 2020 | Released under the MIT License.`)
],
output: {
filename: 'smartTable.min.js',

File diff suppressed because one or more lines are too long

View File

@@ -134,6 +134,7 @@
</tr>
<tr unsort>
<td colspan="6">合计</td>
<td>6上海市长宁区淞虹路888号</td>
<td>200331</td>
</tr>
</tbody>

File diff suppressed because one or more lines are too long

View File

@@ -1,7 +1,7 @@
{
"name": "smart-utils",
"version": "1.0.0",
"description": "smart uitls for ssr",
"name": "smart-table",
"version": "1.1.0",
"description": "smart table for static html",
"main": "index.js",
"scripts": {
"serve": "webpack-dev-server --open --config config/webpack.dev.js",
@@ -28,4 +28,4 @@
},
"dependencies": {},
"keywords": []
}
}