meocord 1.0.7 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/webpack.config.js +17 -9
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "meocord",
3
3
  "description": "MeoCord is a lightweight and modular framework for building scalable Discord bots using TypeScript and Discord.js. It simplifies bot development with an extensible architecture, TypeScript-first approach, and powerful CLI tools.",
4
- "version": "1.0.7",
4
+ "version": "1.0.8",
5
5
  "packageManager": "yarn@4.7.0",
6
6
  "type": "module",
7
7
  "scripts": {
package/webpack.config.js CHANGED
@@ -115,15 +115,23 @@ const createWebpackConfig = (overrides = {}) => {
115
115
 
116
116
  finalMinimizerArray.push(...otherMinimizers)
117
117
 
118
- const terserPluginToUse = lastTerserInstance
119
- ? new TerserPlugin({
120
- ...lastTerserInstance.options,
121
- terserOptions: {
122
- ...lastTerserInstance.options?.terserOptions,
123
- keep_classnames: true,
124
- },
125
- })
126
- : new TerserPlugin({ terserOptions: { keep_classnames: true } })
118
+ let terserPluginToUse
119
+ if (lastTerserInstance) {
120
+ terserPluginToUse = new TerserPlugin({
121
+ test: lastTerserInstance.options?.test,
122
+ include: lastTerserInstance.options?.include,
123
+ exclude: lastTerserInstance.options?.exclude,
124
+ extractComments: lastTerserInstance.options?.extractComments,
125
+ parallel: lastTerserInstance.options?.parallel,
126
+ minify: lastTerserInstance.options?.minify,
127
+ terserOptions: {
128
+ ...(lastTerserInstance.options?.terserOptions || {}),
129
+ keep_classnames: true,
130
+ },
131
+ })
132
+ } else {
133
+ terserPluginToUse = new TerserPlugin({ terserOptions: { keep_classnames: true } })
134
+ }
127
135
 
128
136
  finalMinimizerArray.push(terserPluginToUse)
129
137
  }