Reduce vsix file size.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
a01f08e618
commit
6417e41d8b
|
@ -13,8 +13,16 @@ for file in ${JSON_FILES[@]}; do
|
||||||
mv $file $file.$BACKUP_SUFFIX
|
mv $file $file.$BACKUP_SUFFIX
|
||||||
json5 -o $file $file.$BACKUP_SUFFIX
|
json5 -o $file $file.$BACKUP_SUFFIX
|
||||||
done
|
done
|
||||||
|
MD_FILES=(README.md CHANGELOG.md)
|
||||||
|
for file in ${MD_FILES[@]}; do
|
||||||
|
mv $file $file.$BACKUP_SUFFIX
|
||||||
|
tail -n +9 $file > $file
|
||||||
|
done
|
||||||
json -j0 -I -e "$(cat ./scripts/package-json-cleanup.js)" -f package.json
|
json -j0 -I -e "$(cat ./scripts/package-json-cleanup.js)" -f package.json
|
||||||
vsce package --baseContentUrl=$(json -f package.json repository.url)
|
vsce package --baseContentUrl=$(json -f package.json repository.url)
|
||||||
for file in ${JSON_FILES[@]}; do
|
for file in ${JSON_FILES[@]}; do
|
||||||
mv $file.$BACKUP_SUFFIX $file
|
mv $file.$BACKUP_SUFFIX $file
|
||||||
done
|
done
|
||||||
|
for file in ${MD_FILES[@]}; do
|
||||||
|
mv $file.$BACKUP_SUFFIX $file
|
||||||
|
done
|
||||||
|
|
|
@ -8,8 +8,11 @@
|
||||||
|
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import * as webpack from 'webpack';
|
import * as webpack from 'webpack';
|
||||||
|
import { argv } from 'process';
|
||||||
import TerserPlugin from 'terser-webpack-plugin';
|
import TerserPlugin from 'terser-webpack-plugin';
|
||||||
|
|
||||||
|
const isProduction = 'production' === argv[argv.indexOf('--mode') + 1];
|
||||||
|
|
||||||
const config: webpack.Configuration = {
|
const config: webpack.Configuration = {
|
||||||
target: 'node',
|
target: 'node',
|
||||||
entry: './src/extension.ts',
|
entry: './src/extension.ts',
|
||||||
|
@ -19,7 +22,7 @@ const config: webpack.Configuration = {
|
||||||
libraryTarget: 'commonjs2',
|
libraryTarget: 'commonjs2',
|
||||||
devtoolModuleFilenameTemplate: '../[resource-path]',
|
devtoolModuleFilenameTemplate: '../[resource-path]',
|
||||||
},
|
},
|
||||||
devtool: 'source-map',
|
devtool: isProduction ? false : 'source-map',
|
||||||
optimization: {
|
optimization: {
|
||||||
concatenateModules: true,
|
concatenateModules: true,
|
||||||
minimize: true,
|
minimize: true,
|
||||||
|
|
Loading…
Reference in New Issue