Skip to content

Commit

Permalink
build: enable production mode (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
merceyz authored Jan 4, 2023
1 parent 8c8e329 commit 96a4e34
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion mkshims.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {Engine} from './sources/Engine';
import {SupportedPackageManagerSet} from './sources/types';

function shouldGenerateShim(name: string) {
return !name.startsWith(`vendors`);
return name !== `chunks`;
}

const engine = new Engine();
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
"semver": "^7.1.3",
"supports-color": "^9.0.0",
"tar": "^6.0.1",
"terser-webpack-plugin": "^5.1.2",
"ts-loader": "^9.0.0",
"ts-node": "^10.0.0",
"typescript": "^4.3.2",
Expand Down
10 changes: 3 additions & 7 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
const TerserPlugin = require(`terser-webpack-plugin`);
const webpack = require(`webpack`);

module.exports = {
mode: `development`,
mode: `production`,
devtool: false,
target: `node`,
entry: {
[`corepack`]: `./sources/_entryPoint.ts`,
},
output: {
libraryTarget: `commonjs`,
chunkFilename: `chunks/[name].cjs`,
},
resolve: {
extensions: [`.ts`, `.js`],
Expand All @@ -33,11 +33,7 @@ module.exports = {
assetsSort: `!size`,
},
optimization: {
minimizer: [
new TerserPlugin({
extractComments: false,
}),
],
minimize: false,
},
plugins: [
new webpack.BannerPlugin({
Expand Down
3 changes: 1 addition & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2279,7 +2279,6 @@ __metadata:
semver: "npm:^7.1.3"
supports-color: "npm:^9.0.0"
tar: "npm:^6.0.1"
terser-webpack-plugin: "npm:^5.1.2"
ts-loader: "npm:^9.0.0"
ts-node: "npm:^10.0.0"
typescript: "npm:^4.3.2"
Expand Down Expand Up @@ -5756,7 +5755,7 @@ __metadata:
languageName: node
linkType: hard

"terser-webpack-plugin@npm:^5.1.2, terser-webpack-plugin@npm:^5.1.3":
"terser-webpack-plugin@npm:^5.1.3":
version: 5.3.6
resolution: "terser-webpack-plugin@npm:5.3.6"
dependencies:
Expand Down

0 comments on commit 96a4e34

Please sign in to comment.