Skip to content

Commit 1082f23

Browse files
authored
fix: Point to correct license files in bundle banner. (#91)
1 parent 36d4e3c commit 1082f23

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

.github/scripts/deploy.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@ bucket=$1
55

66
aws s3api put-object --bucket $bucket --key "content/$version/cwr.js" --body build/assets/cwr.js --cache-control max-age=604800
77
aws s3api put-object --bucket $bucket --key "content/$version/LICENSE-THIRD-PARTY" --body LICENSE-THIRD-PARTY --cache-control max-age=604800
8+
aws s3api put-object --bucket $bucket --key "content/$version/LICENSE" --body LICENSE --cache-control max-age=604800
89

910
if [[ $version =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]
1011
then
1112
minorUpdate=$(echo $version | sed -En "s/^([0-9]+\.)[0-9]+\.[0-9]+/\1x/p")
1213
aws s3api put-object --bucket $bucket --key "content/$minorUpdate/cwr.js" --body build/assets/cwr.js --cache-control max-age=7200
1314
aws s3api put-object --bucket $bucket --key "content/$minorUpdate/LICENSE-THIRD-PARTY" --body LICENSE-THIRD-PARTY --cache-control max-age=7200
15+
aws s3api put-object --bucket $bucket --key "content/$minorUpdate/LICENSE" --body LICENSE --cache-control max-age=7200
1416
patchUpdate=$(echo $version | sed -En "s/^([0-9]+\.[0-9]+\.)[0-9]+/\1x/p")
1517
aws s3api put-object --bucket $bucket --key "content/$patchUpdate/cwr.js" --body build/assets/cwr.js --cache-control max-age=7200
1618
aws s3api put-object --bucket $bucket --key "content/$patchUpdate/LICENSE-THIRD-PARTY" --body LICENSE-THIRD-PARTY --cache-control max-age=7200
19+
aws s3api put-object --bucket $bucket --key "content/$patchUpdate/LICENSE" --body LICENSE --cache-control max-age=7200
1720
fi

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@
8989
"webpack-cli": "^4.9.0",
9090
"webpack-dev-middleware": "^5.2.1",
9191
"webpack-dev-server": "^4.3.1",
92-
"webpack-license-plugin": "^4.2.1",
9392
"webpack-merge": "^5.8.0",
9493
"xhr-mock": "^2.5.1"
9594
},

webpack/webpack.prod.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
const path = require('path');
22
const { merge } = require('webpack-merge');
33
const common = require('./webpack.common');
4-
const LicensePlugin = require('webpack-license-plugin');
54
const TerserPlugin = require('terser-webpack-plugin');
65

76
module.exports = merge(common, {
8-
plugins: [new LicensePlugin()],
97
mode: 'production',
108
optimization: {
119
minimizer: [
1210
new TerserPlugin({
1311
parallel: true,
14-
extractComments: true
12+
extractComments: {
13+
banner: (licenseFile) => {
14+
return `License information can be found in LICENSE and LICENSE-THIRD-PARTY`;
15+
}
16+
}
1517
})
1618
]
1719
},

0 commit comments

Comments
 (0)