@moneko/core 3.8.7-beta.0 → 3.8.7-beta.1
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.
- package/lib/common.d.ts +3 -3
- package/lib/minify.d.ts +7 -8
- package/lib/plugin/add-entry-attribute.js +1 -1
- package/package.json +2 -3
- package/typings/global.d.ts +5 -5
package/lib/common.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type
|
|
2
|
-
export declare const outputConfig:
|
|
3
|
-
export declare const clientConfig:
|
|
1
|
+
import { type Configuration } from 'webpack';
|
|
2
|
+
export declare const outputConfig: Configuration['output'];
|
|
3
|
+
export declare const clientConfig: Configuration;
|
package/lib/minify.d.ts
CHANGED
|
@@ -1,26 +1,25 @@
|
|
|
1
1
|
import TerserPlugin from 'terser-webpack-plugin';
|
|
2
|
-
import type { MinifierType,
|
|
3
|
-
import type { JsMinifyOptions } from '@swc/core';
|
|
2
|
+
import type { MinifierType, SwcMinifyOptions, TerserMinifyOptions } from '.';
|
|
4
3
|
type MinifyObject = {
|
|
5
4
|
terser: {
|
|
6
5
|
minify: typeof TerserPlugin.terserMinify;
|
|
7
|
-
terserOptions:
|
|
6
|
+
terserOptions: TerserMinifyOptions;
|
|
8
7
|
extractComments?: boolean;
|
|
9
8
|
};
|
|
10
9
|
swc: {
|
|
11
10
|
minify: typeof TerserPlugin.swcMinify;
|
|
12
|
-
terserOptions?:
|
|
11
|
+
terserOptions?: SwcMinifyOptions;
|
|
13
12
|
};
|
|
14
13
|
};
|
|
15
14
|
export declare const minify: MinifyObject;
|
|
16
|
-
export declare const getMinifyOption: (type: MinifierType, options?:
|
|
15
|
+
export declare const getMinifyOption: (type: MinifierType, options?: SwcMinifyOptions | TerserMinifyOptions) => ({
|
|
17
16
|
minify: typeof TerserPlugin.terserMinify;
|
|
18
|
-
terserOptions:
|
|
17
|
+
terserOptions: TerserMinifyOptions;
|
|
19
18
|
extractComments?: boolean | undefined;
|
|
20
19
|
} | {
|
|
21
20
|
minify: typeof TerserPlugin.swcMinify;
|
|
22
|
-
terserOptions?:
|
|
21
|
+
terserOptions?: SwcMinifyOptions | undefined;
|
|
23
22
|
}) & {
|
|
24
|
-
terserOptions:
|
|
23
|
+
terserOptions: SwcMinifyOptions | TerserMinifyOptions;
|
|
25
24
|
};
|
|
26
25
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default class{constructor(t){this.entryMatchCallback=t}apply(
|
|
1
|
+
import t from"html-webpack-plugin";export default class{constructor(t){this.entryMatchCallback=t}apply(a){a.hooks.compilation.tap("AddEntryAttributeWebpackPlugin",e=>{let r=a.options.plugins.find(a=>a instanceof t);r&&r.getHooks(e).alterAssetTagGroups.tap("AddEntryAttributeWebpackPlugin",t=>(t.headTags.forEach(t=>{"script"===t.tagName&&this.entryMatchCallback(t.attributes.src)&&(t.attributes.entry=!0)}),t))})}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moneko/core",
|
|
3
|
-
"version": "3.8.7-beta.
|
|
3
|
+
"version": "3.8.7-beta.1",
|
|
4
4
|
"description": "core",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -38,11 +38,10 @@
|
|
|
38
38
|
"ts-import-plugin": "3.0.0",
|
|
39
39
|
"ts-loader": "9.5.1",
|
|
40
40
|
"typescript": "5.3.2",
|
|
41
|
-
"webpack": "5.
|
|
41
|
+
"webpack": "5.89.0",
|
|
42
42
|
"webpack-bundle-analyzer": "4.10.1",
|
|
43
43
|
"webpack-cli": "5.1.4",
|
|
44
44
|
"webpack-dev-server": "4.15.1",
|
|
45
|
-
"webpack-merge": "5.10.0",
|
|
46
45
|
"webpack-virtual-modules": "0.6.1",
|
|
47
46
|
"webpackbar": "5.0.2",
|
|
48
47
|
"xml2js": "0.6.2"
|
package/typings/global.d.ts
CHANGED
|
@@ -4,11 +4,11 @@ import type { BundleAnalyzerOption } from './bundle-analyzer.d';
|
|
|
4
4
|
import type { OverrideResolverOption } from '../lib/index';
|
|
5
5
|
import type { DonePluginOption } from '../lib/plugin/done';
|
|
6
6
|
import type { MdxOptions } from '@moneko/mdx';
|
|
7
|
-
import type {
|
|
7
|
+
import type { Config as SwcConfig, JsMinifyOptions as SwcMinifyOptions } from '@swc/core';
|
|
8
8
|
import type { Options as AssetHtmlOptions } from 'add-asset-html-webpack-plugin';
|
|
9
9
|
import type { CssNanoOptionsExtended } from 'css-minimizer-webpack-plugin';
|
|
10
10
|
import type { Options as HtmlWebpackPluginOptions } from 'html-webpack-plugin';
|
|
11
|
-
import type { MinifyOptions } from 'terser';
|
|
11
|
+
import type { MinifyOptions as TerserMinifyOptions } from 'terser';
|
|
12
12
|
import type { Options } from 'ts-import-plugin';
|
|
13
13
|
import type {
|
|
14
14
|
Configuration,
|
|
@@ -23,12 +23,12 @@ import type {
|
|
|
23
23
|
ProxyConfigArray,
|
|
24
24
|
ProxyConfigMap,
|
|
25
25
|
} from 'webpack-dev-server';
|
|
26
|
+
|
|
27
|
+
export type { TerserMinifyOptions, SwcMinifyOptions };
|
|
26
28
|
export type WebpackBarOptions = ConstructorParameters<typeof WebpackBar>[0];
|
|
27
29
|
export type MinifierType = 'swc' | 'terser';
|
|
28
30
|
export declare type AppType = 'mobile' | 'site' | 'backstage' | 'micro' | 'library';
|
|
29
31
|
export declare type Framework = 'react' | 'solid';
|
|
30
|
-
export type TerserOptions = MinifyOptions;
|
|
31
|
-
export type SwcOptions = JsMinifyOptions;
|
|
32
32
|
export type HtmlWebpackOption = HtmlWebpackPluginOptions & {
|
|
33
33
|
tags?: {
|
|
34
34
|
textContent?: string;
|
|
@@ -116,7 +116,7 @@ export declare type ConfigType<T extends 'tsc' | 'swc' = 'swc'> = {
|
|
|
116
116
|
* @default 'swc'
|
|
117
117
|
*/
|
|
118
118
|
type?: MinifierType;
|
|
119
|
-
options?:
|
|
119
|
+
options?: SwcMinifyOptions | TerserMinifyOptions;
|
|
120
120
|
}
|
|
121
121
|
| false;
|
|
122
122
|
css?:
|