@visulima/packem-rollup 1.0.0-alpha.22 → 1.0.0-alpha.24
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/CHANGELOG.md +25 -0
- package/LICENSE.md +0 -436
- package/dist/index.d.ts +25 -26
- package/dist/index.js +1 -0
- package/dist/packem_shared/cachingPlugin-CLawAGhx.js +1 -0
- package/dist/packem_shared/createSplitChunks-Ceq_Ca5Y.js +1 -0
- package/dist/packem_shared/{esbuildPlugin-BrFhdKJk.mjs → esbuildPlugin-DpLtQGuZ.js} +1 -1
- package/dist/packem_shared/oxcResolvePlugin-Ccef6pyL.js +1 -0
- package/dist/packem_shared/{patchTypescriptTypes-BEdkvKxL.mjs → patchTypescriptTypes-BX_sJsvd.js} +2 -2
- package/dist/packem_shared/{resolveTsconfigPathsPlugin-pUcTdE77.mjs → resolveTsconfigPathsPlugin-CEasmDpi.js} +1 -1
- package/dist/packem_shared/{resolveTsconfigRootDirectoriesPlugin-_93afm2q.mjs → resolveTsconfigRootDirectoriesPlugin-Cwj3tqCJ.js} +1 -1
- package/dist/packem_shared/{types-Bk7lLMcF.d.ts → types-BiZanzz1.d.ts} +25 -136
- package/dist/plugins/cjs-interop.d.ts +11 -0
- package/dist/{packem_shared/cjsInteropPlugin-D5wyoQ_B.mjs → plugins/cjs-interop.js} +1 -1
- package/dist/plugins/copy.d.ts +18 -0
- package/dist/plugins/copy.js +1 -0
- package/dist/plugins/data-uri.d.ts +12 -0
- package/dist/plugins/data-uri.js +1 -0
- package/dist/plugins/debarrel.d.ts +11 -0
- package/dist/{packem_shared/debarrelPlugin-BTYc859G.mjs → plugins/debarrel.js} +1 -1
- package/dist/plugins/esbuild/index.d.ts +19 -5
- package/dist/plugins/esbuild/index.js +1 -0
- package/dist/plugins/esm-shim-cjs-syntax.d.ts +13 -0
- package/dist/plugins/fix-dts-default-cjs-exports.d.ts +9 -0
- package/dist/plugins/fix-dts-default-cjs-exports.js +1 -0
- package/dist/plugins/isolated-declarations/index.d.ts +13 -0
- package/dist/{packem_shared/isolatedDeclarationsPlugin-B34s_qkE.mjs → plugins/isolated-declarations/index.js} +1 -1
- package/dist/plugins/json.d.ts +7 -0
- package/dist/plugins/json.js +1 -0
- package/dist/plugins/jsx-remove-attributes.d.ts +11 -0
- package/dist/plugins/jsx-remove-attributes.js +1 -0
- package/dist/plugins/license.d.ts +21 -0
- package/dist/plugins/license.js +13 -0
- package/dist/plugins/minify-html-literals/index.d.ts +96 -6
- package/dist/plugins/native-modules-plugin.d.ts +9 -0
- package/dist/plugins/oxc/index.d.ts +20 -6
- package/dist/plugins/oxc/index.js +1 -0
- package/dist/plugins/preserve-directives.d.ts +13 -0
- package/dist/{packem_shared/preserveDirectivesPlugin-B49Cbykd.mjs → plugins/preserve-directives.js} +3 -3
- package/dist/plugins/raw.d.ts +11 -0
- package/dist/plugins/require-cjs-transformer.d.ts +19 -0
- package/dist/plugins/require-cjs-transformer.js +25 -0
- package/dist/plugins/shebang.d.ts +13 -0
- package/dist/plugins/source-maps.d.ts +11 -0
- package/dist/plugins/sucrase/index.d.ts +18 -4
- package/dist/plugins/swc/index.d.ts +19 -5
- package/dist/plugins/swc/index.js +1 -0
- package/dist/plugins/typescript/index.d.ts +20 -6
- package/dist/plugins/typescript/index.js +1 -0
- package/dist/plugins/url.d.ts +17 -0
- package/dist/plugins/url.js +1 -0
- package/package.json +86 -18
- package/dist/index.d.mts +0 -59
- package/dist/index.mjs +0 -1
- package/dist/packem_shared/browserslist-to-esbuild-DY9HwYtp.d.mts +0 -3
- package/dist/packem_shared/cachingPlugin-TWoY5ZxV.mjs +0 -1
- package/dist/packem_shared/copyPlugin--6RITp1-.mjs +0 -1
- package/dist/packem_shared/createSplitChunks-CGDk55G3.mjs +0 -1
- package/dist/packem_shared/dataUriPlugin-BFb7bZZs.mjs +0 -1
- package/dist/packem_shared/fixDtsDefaultCjsExportsPlugin-Dp1UcHVR.mjs +0 -1
- package/dist/packem_shared/index-hWYvkB02.d.mts +0 -346
- package/dist/packem_shared/index-hWYvkB02.d.ts +0 -346
- package/dist/packem_shared/jsonPlugin-BAi3Da-h.mjs +0 -1
- package/dist/packem_shared/jsxRemoveAttributes-B1PLPffj.mjs +0 -1
- package/dist/packem_shared/licensePlugin-C5yzUqe-.mjs +0 -13
- package/dist/packem_shared/oxcResolvePlugin-BJpi-eSG.mjs +0 -1
- package/dist/packem_shared/requireCJSTransformerPlugin-qcY8AH5r.mjs +0 -26
- package/dist/packem_shared/types-CMThMMkh.d.mts +0 -4337
- package/dist/packem_shared/urlPlugin-DJJrDWjj.mjs +0 -1
- package/dist/plugins/esbuild/index.d.mts +0 -28
- package/dist/plugins/esbuild/index.mjs +0 -1
- package/dist/plugins/minify-html-literals/index.d.mts +0 -5
- package/dist/plugins/oxc/index.d.mts +0 -31
- package/dist/plugins/oxc/index.mjs +0 -1
- package/dist/plugins/sucrase/index.d.mts +0 -22
- package/dist/plugins/swc/index.d.mts +0 -29
- package/dist/plugins/swc/index.mjs +0 -1
- package/dist/plugins/typescript/index.d.mts +0 -32
- package/dist/plugins/typescript/index.mjs +0 -1
- /package/dist/packem_shared/{browserslistToEsbuild-C0IWmbNe.mjs → browserslistToEsbuild-C0IWmbNe.js} +0 -0
- /package/dist/packem_shared/{chunkSplitter-DWAy1JkE.mjs → chunkSplitter-DWAy1JkE.js} +0 -0
- /package/dist/packem_shared/{fix-dts-default-cjs-exports-BQc0nwIG.mjs → fix-dts-default-cjs-exports-BQc0nwIG.js} +0 -0
- /package/dist/packem_shared/{fixDynamicImportExtension-BBGNRniz.mjs → fixDynamicImportExtension-BBGNRniz.js} +0 -0
- /package/dist/packem_shared/{getCustomModuleLayer-d8i66lfh.mjs → getCustomModuleLayer-d8i66lfh.js} +0 -0
- /package/dist/packem_shared/{getModuleLayer-rF9RxnJ5.mjs → getModuleLayer-rF9RxnJ5.js} +0 -0
- /package/dist/packem_shared/{index-Dq8IUFTs.mjs → index-Dq8IUFTs.js} +0 -0
- /package/dist/packem_shared/{index-QEzU3Fey.mjs → index-QEzU3Fey.js} +0 -0
- /package/dist/packem_shared/{isolatedDeclarationsOxcTransformer-WbfE6cGu.mjs → isolatedDeclarationsOxcTransformer-WbfE6cGu.js} +0 -0
- /package/dist/packem_shared/{isolatedDeclarationsSwcTransformer-Ch2AgtWC.mjs → isolatedDeclarationsSwcTransformer-Ch2AgtWC.js} +0 -0
- /package/dist/packem_shared/{isolatedDeclarationsTypescriptTransformer-DkuEkofo.mjs → isolatedDeclarationsTypescriptTransformer-DkuEkofo.js} +0 -0
- /package/dist/packem_shared/{metafilePlugin-CVcqFpPJ.mjs → metafilePlugin-CVcqFpPJ.js} +0 -0
- /package/dist/packem_shared/{oxcTransformPlugin-DfVQouIB.mjs → oxcTransformPlugin-DfVQouIB.js} +0 -0
- /package/dist/packem_shared/{resolveFileUrlPlugin-BkpjVHeK.mjs → resolveFileUrlPlugin-BkpjVHeK.js} +0 -0
- /package/dist/packem_shared/{resolveTypescriptMjsCtsPlugin-DcZrZTmM.mjs → resolveTypescriptMjsCtsPlugin-DcZrZTmM.js} +0 -0
- /package/dist/packem_shared/{swcPlugin-Boip4lWG.mjs → swcPlugin-Boip4lWG.js} +0 -0
- /package/dist/{packem_shared/esmShimCjsSyntaxPlugin-DjKqX4DE.mjs → plugins/esm-shim-cjs-syntax.js} +0 -0
- /package/dist/plugins/minify-html-literals/{index.mjs → index.js} +0 -0
- /package/dist/{packem_shared/nativeModulesPlugin-D6lO-8g6.mjs → plugins/native-modules-plugin.js} +0 -0
- /package/dist/{packem_shared/rawPlugin-DgRj14Xy.mjs → plugins/raw.js} +0 -0
- /package/dist/{packem_shared/makeExecutable-6aOVHoJR.mjs → plugins/shebang.js} +0 -0
- /package/dist/{packem_shared/sourcemapsPlugin-B4W3J79w.mjs → plugins/source-maps.js} +0 -0
- /package/dist/plugins/sucrase/{index.mjs → index.js} +0 -0
|
@@ -1,6 +1,96 @@
|
|
|
1
|
-
import '@rollup/pluginutils';
|
|
2
|
-
|
|
3
|
-
import '
|
|
4
|
-
import '
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { FilterPattern } from '@rollup/pluginutils';
|
|
2
|
+
import { Plugin } from 'rollup';
|
|
3
|
+
import { SourceMapOptions } from 'magic-string';
|
|
4
|
+
import { MinifierOptions } from 'html-minifier-next';
|
|
5
|
+
|
|
6
|
+
interface Template {
|
|
7
|
+
parts: TemplatePart[];
|
|
8
|
+
tag?: string;
|
|
9
|
+
}
|
|
10
|
+
interface TemplatePart {
|
|
11
|
+
end: number;
|
|
12
|
+
start: number;
|
|
13
|
+
text: string;
|
|
14
|
+
}
|
|
15
|
+
interface Strategy$1<N = unknown> {
|
|
16
|
+
getRootNode: (source: string, fileName?: string) => N;
|
|
17
|
+
getTaggedTemplateTemplate: (node: N) => unknown;
|
|
18
|
+
getTagText: (node: N) => string;
|
|
19
|
+
getTemplateParts: (node: N) => TemplatePart[];
|
|
20
|
+
isTaggedTemplate: (node: N) => boolean;
|
|
21
|
+
isTemplate: (node: N) => boolean;
|
|
22
|
+
walkNodes: (parent: N, visit: (child: N) => void) => void;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface ParseLiteralsOptions {
|
|
26
|
+
fileName?: string;
|
|
27
|
+
strategy?: Partial<Strategy$1<unknown>>;
|
|
28
|
+
}
|
|
29
|
+
declare const parseLiterals: (source: string, options?: ParseLiteralsOptions) => Template[];
|
|
30
|
+
|
|
31
|
+
interface Strategy<O = unknown, C = unknown> {
|
|
32
|
+
combineHTMLStrings: (parts: TemplatePart[], placeholder: string) => string;
|
|
33
|
+
getPlaceholder: (parts: TemplatePart[]) => string;
|
|
34
|
+
minifyCSS?: (css: string, options?: C) => string;
|
|
35
|
+
minifyHTML: (html: string, options?: O) => string | Promise<string>;
|
|
36
|
+
splitHTMLByPlaceholder: (html: string, placeholder: string) => string[];
|
|
37
|
+
}
|
|
38
|
+
declare const defaultMinifyOptions: MinifierOptions;
|
|
39
|
+
|
|
40
|
+
type Options = DefaultOptions | CustomOptions<unknown>;
|
|
41
|
+
interface DefaultOptions extends BaseOptions {
|
|
42
|
+
minifyOptions?: Partial<typeof defaultMinifyOptions>;
|
|
43
|
+
}
|
|
44
|
+
interface CustomOptions<S extends Strategy | unknown> extends BaseOptions {
|
|
45
|
+
minifyOptions?: S extends Strategy<infer O> ? Partial<O> : never;
|
|
46
|
+
strategy: S;
|
|
47
|
+
}
|
|
48
|
+
interface BaseOptions {
|
|
49
|
+
fileName?: string;
|
|
50
|
+
generateSourceMap?: ((ms: MagicStringLike, fileName: string) => SourceMap | undefined) | false;
|
|
51
|
+
MagicString?: new (source: string) => MagicStringLike;
|
|
52
|
+
parseLiterals?: typeof parseLiterals;
|
|
53
|
+
parseLiteralsOptions?: Partial<ParseLiteralsOptions>;
|
|
54
|
+
shouldMinify?: (template: Template) => boolean;
|
|
55
|
+
shouldMinifyCSS?: (template: Template) => boolean;
|
|
56
|
+
validate?: Validation | false;
|
|
57
|
+
}
|
|
58
|
+
interface MagicStringLike {
|
|
59
|
+
generateMap: (options?: Partial<SourceMapOptions>) => SourceMap;
|
|
60
|
+
overwrite: (start: number, end: number, content: string) => unknown;
|
|
61
|
+
toString: () => string;
|
|
62
|
+
}
|
|
63
|
+
interface SourceMap {
|
|
64
|
+
file?: string;
|
|
65
|
+
mappings: string;
|
|
66
|
+
names: string[];
|
|
67
|
+
sources: string[];
|
|
68
|
+
sourcesContent?: string[];
|
|
69
|
+
toString: () => string;
|
|
70
|
+
toUrl: () => string;
|
|
71
|
+
version: number;
|
|
72
|
+
}
|
|
73
|
+
interface Validation {
|
|
74
|
+
ensureHTMLPartsValid: (parts: TemplatePart[], htmlParts: string[]) => void;
|
|
75
|
+
ensurePlaceholderValid: (placeholder: unknown) => void;
|
|
76
|
+
}
|
|
77
|
+
interface Result {
|
|
78
|
+
code: string;
|
|
79
|
+
map: SourceMap | undefined;
|
|
80
|
+
}
|
|
81
|
+
declare function minifyHTMLLiterals(source: string, options?: DefaultOptions): Promise<Result | null>;
|
|
82
|
+
declare function minifyHTMLLiterals<S extends Strategy>(source: string, options?: CustomOptions<S>): Promise<Result | null>;
|
|
83
|
+
|
|
84
|
+
interface MinifyHTMLLiteralsOptions {
|
|
85
|
+
exclude?: FilterPattern;
|
|
86
|
+
failOnError?: boolean;
|
|
87
|
+
include?: FilterPattern;
|
|
88
|
+
minifyHTMLLiterals?: typeof minifyHTMLLiterals;
|
|
89
|
+
options?: Partial<Options>;
|
|
90
|
+
}
|
|
91
|
+
declare const minifyHTMLLiteralsPlugin: ({ exclude, failOnError, include, logger, minifyHTMLLiterals, options, }: MinifyHTMLLiteralsOptions & {
|
|
92
|
+
logger: Console;
|
|
93
|
+
}) => Plugin;
|
|
94
|
+
|
|
95
|
+
export { minifyHTMLLiteralsPlugin as default, minifyHTMLLiteralsPlugin };
|
|
96
|
+
export type { MinifyHTMLLiteralsOptions };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { IsolatedDeclarationsOptions } from 'oxc-transform';
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
4
|
-
import { P as PailServerType } from '../../packem_shared/index-hWYvkB02.js';
|
|
2
|
+
import { I as IsolatedDeclarationsResult, i as OxcResolveOptions, T as TransformerFn } from '../../packem_shared/types-BiZanzz1.js';
|
|
3
|
+
export { j as InternalOXCTransformPluginConfig, k as OXCTransformPluginConfig } from '../../packem_shared/types-BiZanzz1.js';
|
|
5
4
|
import { Plugin } from 'rollup';
|
|
6
5
|
import '@rollup/plugin-alias';
|
|
7
6
|
import '@rollup/plugin-commonjs';
|
|
@@ -14,17 +13,32 @@ import 'rollup-plugin-dts';
|
|
|
14
13
|
import 'rollup-plugin-polyfill-node';
|
|
15
14
|
import 'rollup-plugin-pure';
|
|
16
15
|
import 'rollup-plugin-visualizer';
|
|
16
|
+
import '../cjs-interop.js';
|
|
17
|
+
import '../copy.js';
|
|
18
|
+
import '../data-uri.js';
|
|
19
|
+
import '../debarrel.js';
|
|
17
20
|
import 'esbuild';
|
|
21
|
+
import '../esm-shim-cjs-syntax.js';
|
|
18
22
|
import '@visulima/package';
|
|
23
|
+
import '../isolated-declarations/index.js';
|
|
19
24
|
import '@visulima/packem-share/types';
|
|
20
|
-
import '
|
|
21
|
-
import '
|
|
25
|
+
import '../jsx-remove-attributes.js';
|
|
26
|
+
import '../license.js';
|
|
27
|
+
import '../minify-html-literals/index.js';
|
|
22
28
|
import 'magic-string';
|
|
23
29
|
import 'html-minifier-next';
|
|
30
|
+
import '../native-modules-plugin.js';
|
|
31
|
+
import 'oxc-resolver';
|
|
32
|
+
import '../raw.js';
|
|
33
|
+
import '../require-cjs-transformer.js';
|
|
34
|
+
import '../shebang.js';
|
|
35
|
+
import '../source-maps.js';
|
|
36
|
+
import 'sucrase';
|
|
37
|
+
import '../url.js';
|
|
24
38
|
|
|
25
39
|
declare const isolatedDeclarationsOxcTransformer: (id: string, code: string, sourceMap?: boolean, transformOptions?: Omit<IsolatedDeclarationsOptions, "sourcemap">) => IsolatedDeclarationsResult;
|
|
26
40
|
|
|
27
|
-
declare const oxcResolvePlugin: (options: OxcResolveOptions, rootDirectory: string, logger:
|
|
41
|
+
declare const oxcResolvePlugin: (options: OxcResolveOptions, rootDirectory: string, logger: Console, tsconfigPath?: string) => Plugin;
|
|
28
42
|
|
|
29
43
|
declare const oxcTransformPlugin: TransformerFn;
|
|
30
44
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{default as a}from"../../packem_shared/isolatedDeclarationsOxcTransformer-WbfE6cGu.js";import{default as f}from"../../packem_shared/oxcResolvePlugin-Ccef6pyL.js";import{default as s}from"../../packem_shared/oxcTransformPlugin-DfVQouIB.js";export{a as isolatedDeclarationsOxcTransformer,f as oxcResolvePlugin,s as oxcTransformPlugin};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FilterPattern } from '@rollup/pluginutils';
|
|
2
|
+
import { Plugin } from 'rollup';
|
|
3
|
+
|
|
4
|
+
type PreserveDirectivesPluginOptions = {
|
|
5
|
+
directiveRegex: RegExp;
|
|
6
|
+
exclude?: FilterPattern;
|
|
7
|
+
include?: FilterPattern;
|
|
8
|
+
logger: Console;
|
|
9
|
+
};
|
|
10
|
+
declare const preserveDirectivesPlugin: ({ directiveRegex, exclude, include, logger }: PreserveDirectivesPluginOptions) => Plugin;
|
|
11
|
+
|
|
12
|
+
export { preserveDirectivesPlugin };
|
|
13
|
+
export type { PreserveDirectivesPluginOptions };
|
package/dist/{packem_shared/preserveDirectivesPlugin-B49Cbykd.mjs → plugins/preserve-directives.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var b=Object.defineProperty;var v=(a
|
|
1
|
+
var b=Object.defineProperty;var v=(d,a)=>b(d,"name",{value:a,configurable:!0});import{createFilter as x}from"@rollup/pluginutils";import g from"magic-string";var y=Object.defineProperty,$=v((d,a)=>y(d,"name",{value:a,configurable:!0}),"l");const S=$(({directiveRegex:d,exclude:a=[],include:m=[],logger:p})=>{const u={},l={},h=x(m,a);return{name:"packem:preserve-directives",onLog(i,t){if(t.code==="MODULE_LEVEL_DIRECTIVE"&&i==="warn")return!1},renderChunk:{handler(i,t,{sourcemap:c}){const s=t.moduleIds.map(r=>{if(u[r])return u[r]}).reduce((r,f)=>(f&&f.forEach(o=>{r.add(o)}),r),new Set),n=new g(i);s.size>0&&(p.debug({message:`directives for chunk "${t.fileName}" are preserved.`,prefix:"plugin:preserve-directives"}),n.prepend(`${[...s].map(r=>`'${r}';`).join(`
|
|
2
2
|
`)}
|
|
3
|
-
`));let e;if(t.facadeModuleId&&typeof
|
|
4
|
-
`)),!(s.size===0&&e===void 0))return{code:n.toString(),map:c?n.generateMap({hires:!0}):void 0}},order:"post"},transform(i,t){if(!h(t))return;let c=!1;const s=new g(i);if(i.startsWith("#")&&i[1]==="!"){let e=0;for(let r=2,
|
|
3
|
+
`));let e;if(t.facadeModuleId&&typeof l[t.facadeModuleId]=="string"&&(e=l[t.facadeModuleId]),e&&(p.debug({message:`shebang for chunk "${t.fileName}" is preserved.`,prefix:"plugin:preserve-directives"}),n.prepend(`${e}
|
|
4
|
+
`)),!(s.size===0&&e===void 0))return{code:n.toString(),map:c?n.generateMap({hires:!0}):void 0}},order:"post"},transform(i,t){if(!h(t))return;let c=!1;const s=new g(i);if(i.startsWith("#")&&i[1]==="!"){let e=0;for(let r=2,f=i.length;r<f;r++){const o=i.codePointAt(r);if(o===10||o===13||o===8232||o===8233){e=r;break}}e&&(l[t]=i.slice(0,e),s.remove(0,e+1),c=!0,p.debug({message:`shebang for module "${t}" is preserved.`,prefix:"plugin:preserve-directives"}))}let n;try{n=this.parse(s.toString(),{allowReturnOutsideFunction:!0})}catch(e){this.warn({code:"PARSE_ERROR",message:`failed to parse "${t}" and extract the directives.`}),p.warn(e);return}if(n.type==="Program"){for(const e of n.body.filter(Boolean)){if(e.type!=="ExpressionStatement")break;let r;"directive"in e?r=e.directive:e.expression.type==="Literal"&&typeof e.expression.value=="string"&&d.test(e.expression.value)&&(r=e.expression.value),r!=="use strict"&&r&&(u[t]||=new Set,u[t].add(r),"start"in e&&typeof e.start=="number"&&"end"in e&&typeof e.end=="number"&&(s.remove(e.start,e.end),c=!0),p.debug({message:`directive "${r}" for module "${t}" is preserved.`,prefix:"plugin:preserve-directives"}))}if(c)return{code:s.toString(),map:s.generateMap({hires:!0}),meta:{preserveDirectives:{directives:[...u[t]??[]],shebang:l[t]??void 0}}}}}}},"preserveDirectivesPlugin");export{S as preserveDirectivesPlugin};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FilterPattern } from '@rollup/pluginutils';
|
|
2
|
+
import { Plugin } from 'rollup';
|
|
3
|
+
|
|
4
|
+
interface RawLoaderOptions {
|
|
5
|
+
exclude?: FilterPattern;
|
|
6
|
+
include?: FilterPattern;
|
|
7
|
+
}
|
|
8
|
+
declare const rawPlugin: (options: RawLoaderOptions) => Plugin;
|
|
9
|
+
|
|
10
|
+
export { rawPlugin };
|
|
11
|
+
export type { RawLoaderOptions };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FilterPattern } from '@rollup/pluginutils';
|
|
2
|
+
import { Plugin } from 'rollup';
|
|
3
|
+
|
|
4
|
+
type Awaitable<T> = T | Promise<T>;
|
|
5
|
+
type TransformFunction = (id: string, importer: string, rollupResolve: (id: string, importer?: string) => Promise<{
|
|
6
|
+
id: string;
|
|
7
|
+
}>) => Awaitable<boolean | undefined | void>;
|
|
8
|
+
interface Options {
|
|
9
|
+
builtinNodeModules?: boolean;
|
|
10
|
+
cwd?: string;
|
|
11
|
+
exclude?: FilterPattern;
|
|
12
|
+
include?: FilterPattern;
|
|
13
|
+
order?: "pre" | "post" | undefined;
|
|
14
|
+
shouldTransform?: string[] | TransformFunction;
|
|
15
|
+
}
|
|
16
|
+
declare const requireCJSTransformerPlugin: (userOptions: Options, logger: Console) => Plugin;
|
|
17
|
+
|
|
18
|
+
export { requireCJSTransformerPlugin };
|
|
19
|
+
export type { Options, TransformFunction };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
var H=Object.defineProperty;var b=(e,i)=>H(e,"name",{value:i,configurable:!0});import{createRequire as Y,builtinModules as Z}from"node:module";import z from"node:process";import{createFilter as Q}from"@rollup/pluginutils";import{init as W,parse as V}from"cjs-module-lexer";import B from"magic-string";import{parseSync as X}from"oxc-parser";import{readFile as ee}from"@visulima/fs";import{findPackageJson as se}from"@visulima/package/package-json";var te=Object.defineProperty,re=b((e,i)=>te(e,"name",{value:i,configurable:!0}),"s");const ie=re(async(e,i,_)=>{if(await W(),e.startsWith("node:"))return!1;if(e.endsWith(".cjs"))return!0;if(e.endsWith(".js")||!e.includes("/")&&!e.startsWith(".")){let c;if(_)try{c=(await _(e,i)).id}catch{}if(!c&&i&&!i.includes("!~{"))try{c=Y(i).resolve(e)}catch{}if(c){try{const{packageJson:f}=await se(c);if(f.type==="module")return!1;if(f.type==="commonjs")return!0}catch{}try{const f=await ee(c,{encoding:"utf8"});try{return V(f,c),!0}catch{}}catch{}}}return!1},"isPureCJS");var oe=Object.defineProperty,u=b((e,i)=>oe(e,"name",{value:i,configurable:!0}),"o");let R=!1;const v="__cjs_require",S='import { createRequire as __cjs_createRequire } from "node:module";',x=`const ${v} = __cjs_createRequire(import.meta.url);`,J='const __cjs_getProcess = typeof globalThis !== "undefined" && typeof globalThis.process !== "undefined" ? globalThis.process : process;',k=`const __cjs_getBuiltinModule = (module) => {
|
|
2
|
+
// Check if we're in Node.js and version supports getBuiltinModule
|
|
3
|
+
if (typeof __cjs_getProcess !== "undefined" && __cjs_getProcess.versions && __cjs_getProcess.versions.node) {
|
|
4
|
+
const [major, minor] = __cjs_getProcess.versions.node.split(".").map(Number);
|
|
5
|
+
// Node.js 20.16.0+ and 22.3.0+
|
|
6
|
+
if (major > 22 || (major === 22 && minor >= 3) || (major === 20 && minor >= 16)) {
|
|
7
|
+
return __cjs_getProcess.getBuiltinModule(module);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
// Fallback to createRequire
|
|
11
|
+
return __cjs_require(module);
|
|
12
|
+
};`,C=u(e=>e.includes("import { createRequire as __cjs_createRequire }")&&e.includes('"node:module"'),"hasCreateRequireImport"),O=u(e=>e.includes(`const ${v} = __cjs_createRequire(import.meta.url)`),"hasRequireDeclaration"),ne=u(e=>e.includes('const __cjs_getProcess = typeof globalThis !== "undefined"')&&e.includes('globalThis.process !== "undefined"'),"hasGetProcessDeclaration"),ce=u(e=>e.includes("const __cjs_getBuiltinModule = (module) =>")&&e.includes("__cjs_getProcess.getBuiltinModule(module)"),"hasGetBuiltinModuleDeclaration"),ue=u(e=>/const\s+__cjs_require\s*=|[^.\w]__cjs_require\s*\(/.test(e)||e.startsWith("__cjs_require("),"hasRequireUsage"),le=u(e=>/const\s+__cjs_getProcess\s*=|[^.\w]__cjs_getProcess[^=]|^__cjs_getProcess/.test(e),"hasProcessUsage"),ae=u(e=>/const\s+__cjs_getBuiltinModule\s*=|[^.\w]__cjs_getBuiltinModule\s*\(/.test(e)||e.startsWith("__cjs_getBuiltinModule("),"hasBuiltinUsage"),de=u(e=>{if(Array.isArray(e.shouldTransform)){const{shouldTransform:i}=e;e.shouldTransform=_=>i.includes(_)}return{builtinNodeModules:!!e.builtinNodeModules,cwd:e.cwd||z.cwd(),exclude:e.exclude||[/node_modules/,/\.d\.[cm]?ts$/],include:e.include||[/\.[cm]?[jt]sx?$/],order:"order"in e?e.order:"pre",shouldTransform:e.shouldTransform}},"resolveOptions"),$e=u((e,i)=>{const{builtinNodeModules:_,cwd:c,exclude:f,include:I,order:A,shouldTransform:D}=de(e),F=Q(I,f);return{async buildStart(){R||(await W(),R=!0)},name:"packem:plugin-require-cjs",renderChunk:{async handler(t,y,U){if(U.format!=="es")return;const w=ue(t),M=le(t),T=ae(t);if(w||M||T){let s=t;const r=new B(t);if(O(s)&&!C(s)){const l=/const\s+__cjs_require\s*=\s*__cjs_createRequire\(import\.meta\.url\);\s*/g;s=s.replaceAll(l,""),i.debug({message:`Removed incomplete __cjs_require declaration from ${y.fileName}`,prefix:"plugin:require-cjs-transformer"})}const n=[];if(w&&n.push(S,x),M&&n.push(J),T&&n.push(k),n.length>0){const l=`${n.join(`
|
|
13
|
+
|
|
14
|
+
`)}
|
|
15
|
+
|
|
16
|
+
`;if(s[0]==="#"){const m=s.indexOf(`
|
|
17
|
+
`)+1;r.appendLeft(m,l)}else r.prepend(l);return i.debug({message:`Added complete helpers to chunk: ${y.fileName}, added ${n.length} helper(s)`,prefix:"plugin:require-cjs-transformer"}),{code:r.toString(),map:r.generateMap()}}}if(!F(y.fileName))return;const G=X(y.fileName,t,{astType:"js",lang:"js",sourceType:"module"}),{body:L}=G.program,a=new B(t);let p=!1,P=!1,N=!1;for await(const s of L)if(s.type==="ImportDeclaration"){if(s.importKind==="type")continue;const r=s.source.value,n=_&&(Z.includes(r)||r.startsWith("node:"));let l;if(n)l=!0;else{const o=D?.(r,c,this?.resolveId);l=o===void 0?await ie(r,c,this.resolveId?.bind(this)):o}if(!l)continue;if(s.specifiers.length===0){n?a.remove(s.start,s.end):(a.overwrite(s.start,s.end,`${v}(${JSON.stringify(r)});`),p=!0);continue}const m=[];let g,d;for(const o of s.specifiers)if(o.type==="ImportNamespaceSpecifier")g=o.local.name;else if(o.type==="ImportSpecifier"){if(o.importKind==="type")continue;const $=t.slice(o.imported.start,o.imported.end),h=o.local.name;m.push([$,h])}else d=o.local.name;let j;n?r==="process"||r==="node:process"?(j="__cjs_getProcess",P=!0,p=!0):(j=`__cjs_getBuiltinModule(${JSON.stringify(r)})`,P=!0,N=!0,p=!0):(j=`__cjs_require(${JSON.stringify(r)})`,p=!0);const q=[];if(g&&(d||=`_cjs_${g}_default`),d&&q.push(`const ${d} = ${j};`),g&&q.push(`const ${g} = { ...${d}, default: ${d} };`),m.length>0){const o=`const {
|
|
18
|
+
${m.map(([$,h])=>` ${$===h?h:`${$}: ${h}`}`).join(`,
|
|
19
|
+
`)}
|
|
20
|
+
} = ${d||j};`;q.push(o)}const E=q.join(`
|
|
21
|
+
`);a.overwrite(s.start,s.end,E)}const K=t.includes("__cjs_require")||t.includes("__cjs_getProcess")||t.includes("__cjs_getBuiltinModule");if(p||K){const s=[];(p||t.includes("__cjs_require"))&&(C(t)||s.push(S),O(t)||s.push(x)),(P||t.includes("__cjs_getProcess"))&&!ne(t)&&s.push(J),(N||t.includes("__cjs_getBuiltinModule"))&&!ce(t)&&s.push(k);const r=s.join(`
|
|
22
|
+
|
|
23
|
+
`)+(s.length>0?`
|
|
24
|
+
`:"");if(s.length>0)if(t[0]==="#"){const n=t.indexOf(`
|
|
25
|
+
`)+1;a.appendLeft(n,r)}else a.prepend(r)}return{code:a.toString(),map:a.generateMap()}},order:A}}},"requireCJSTransformerPlugin");export{$e as requireCJSTransformerPlugin};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Plugin } from 'rollup';
|
|
2
|
+
|
|
3
|
+
type ShebangOptions = {
|
|
4
|
+
replace: boolean;
|
|
5
|
+
shebang: string;
|
|
6
|
+
};
|
|
7
|
+
declare const makeExecutable: (filePath: string) => Promise<void>;
|
|
8
|
+
declare const shebangPlugin: (executablePaths: string[], options: ShebangOptions) => Plugin;
|
|
9
|
+
declare const removeShebangPlugin: () => Plugin;
|
|
10
|
+
declare const getShebang: (code: string, append?: string) => string;
|
|
11
|
+
|
|
12
|
+
export { getShebang, makeExecutable, removeShebangPlugin, shebangPlugin };
|
|
13
|
+
export type { ShebangOptions };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FilterPattern } from '@rollup/pluginutils';
|
|
2
|
+
import { Plugin } from 'rollup';
|
|
3
|
+
|
|
4
|
+
interface SourcemapsPluginOptions {
|
|
5
|
+
exclude?: FilterPattern;
|
|
6
|
+
include?: FilterPattern;
|
|
7
|
+
}
|
|
8
|
+
declare const sourcemapsPlugin: ({ exclude, include }?: SourcemapsPluginOptions) => Plugin;
|
|
9
|
+
|
|
10
|
+
export { sourcemapsPlugin };
|
|
11
|
+
export type { SourcemapsPluginOptions };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '@rollup/pluginutils';
|
|
2
2
|
import 'sucrase';
|
|
3
|
-
export {
|
|
3
|
+
export { l as SucrasePluginConfig, s as sucrasePlugin } from '../../packem_shared/types-BiZanzz1.js';
|
|
4
4
|
import '@rollup/plugin-alias';
|
|
5
5
|
import '@rollup/plugin-commonjs';
|
|
6
6
|
import '@rollup/plugin-json';
|
|
@@ -12,11 +12,25 @@ import 'rollup-plugin-dts';
|
|
|
12
12
|
import 'rollup-plugin-polyfill-node';
|
|
13
13
|
import 'rollup-plugin-pure';
|
|
14
14
|
import 'rollup-plugin-visualizer';
|
|
15
|
-
import '
|
|
16
|
-
import '
|
|
17
|
-
import '
|
|
15
|
+
import '../cjs-interop.js';
|
|
16
|
+
import '../copy.js';
|
|
17
|
+
import '../data-uri.js';
|
|
18
|
+
import '../debarrel.js';
|
|
18
19
|
import 'esbuild';
|
|
20
|
+
import '../esm-shim-cjs-syntax.js';
|
|
19
21
|
import '@visulima/package';
|
|
22
|
+
import '../isolated-declarations/index.js';
|
|
20
23
|
import '@visulima/packem-share/types';
|
|
24
|
+
import '../jsx-remove-attributes.js';
|
|
25
|
+
import '../license.js';
|
|
26
|
+
import '../minify-html-literals/index.js';
|
|
27
|
+
import 'magic-string';
|
|
28
|
+
import 'html-minifier-next';
|
|
29
|
+
import '../native-modules-plugin.js';
|
|
21
30
|
import 'oxc-resolver';
|
|
22
31
|
import 'oxc-transform';
|
|
32
|
+
import '../raw.js';
|
|
33
|
+
import '../require-cjs-transformer.js';
|
|
34
|
+
import '../shebang.js';
|
|
35
|
+
import '../source-maps.js';
|
|
36
|
+
import '../url.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { I as IsolatedDeclarationsResult, T as TransformerFn } from '../../packem_shared/types-BiZanzz1.js';
|
|
2
|
+
export { S as SwcPluginConfig } from '../../packem_shared/types-BiZanzz1.js';
|
|
3
3
|
import '@rollup/plugin-alias';
|
|
4
4
|
import '@rollup/plugin-commonjs';
|
|
5
5
|
import '@rollup/plugin-json';
|
|
@@ -12,15 +12,29 @@ import 'rollup-plugin-dts';
|
|
|
12
12
|
import 'rollup-plugin-polyfill-node';
|
|
13
13
|
import 'rollup-plugin-pure';
|
|
14
14
|
import 'rollup-plugin-visualizer';
|
|
15
|
-
import '
|
|
16
|
-
import '
|
|
17
|
-
import '
|
|
15
|
+
import '../cjs-interop.js';
|
|
16
|
+
import '../copy.js';
|
|
17
|
+
import '../data-uri.js';
|
|
18
|
+
import '../debarrel.js';
|
|
18
19
|
import 'esbuild';
|
|
20
|
+
import '../esm-shim-cjs-syntax.js';
|
|
19
21
|
import '@visulima/package';
|
|
22
|
+
import '../isolated-declarations/index.js';
|
|
20
23
|
import '@visulima/packem-share/types';
|
|
24
|
+
import '../jsx-remove-attributes.js';
|
|
25
|
+
import '../license.js';
|
|
26
|
+
import '../minify-html-literals/index.js';
|
|
27
|
+
import 'magic-string';
|
|
28
|
+
import 'html-minifier-next';
|
|
29
|
+
import '../native-modules-plugin.js';
|
|
21
30
|
import 'oxc-resolver';
|
|
22
31
|
import 'oxc-transform';
|
|
32
|
+
import '../raw.js';
|
|
33
|
+
import '../require-cjs-transformer.js';
|
|
34
|
+
import '../shebang.js';
|
|
35
|
+
import '../source-maps.js';
|
|
23
36
|
import 'sucrase';
|
|
37
|
+
import '../url.js';
|
|
24
38
|
|
|
25
39
|
declare const isolatedDeclarationsSwcTransformer: (id: string, code: string, sourceMap?: boolean) => Promise<IsolatedDeclarationsResult>;
|
|
26
40
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{default as e}from"../../packem_shared/isolatedDeclarationsSwcTransformer-Ch2AgtWC.js";import{default as s}from"../../packem_shared/swcPlugin-Boip4lWG.js";export{e as isolatedDeclarationsSwcTransformer,s as swcPlugin};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { TranspileOptions } from 'typescript';
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
4
|
-
import { P as PailServerType } from '../../packem_shared/index-hWYvkB02.js';
|
|
2
|
+
import { I as IsolatedDeclarationsResult, f as TsConfigResult } from '../../packem_shared/types-BiZanzz1.js';
|
|
3
|
+
export { g as PatchTypesOptions, h as TsconfigPathsPluginOptions, p as patchTypescriptTypes, p as patchTypescriptTypesPlugin, r as resolveTsconfigPathsPlugin } from '../../packem_shared/types-BiZanzz1.js';
|
|
5
4
|
import { Plugin } from 'rollup';
|
|
6
5
|
import '@rollup/plugin-alias';
|
|
7
6
|
import '@rollup/plugin-commonjs';
|
|
@@ -14,18 +13,33 @@ import 'rollup-plugin-dts';
|
|
|
14
13
|
import 'rollup-plugin-polyfill-node';
|
|
15
14
|
import 'rollup-plugin-pure';
|
|
16
15
|
import 'rollup-plugin-visualizer';
|
|
16
|
+
import '../cjs-interop.js';
|
|
17
|
+
import '../copy.js';
|
|
18
|
+
import '../data-uri.js';
|
|
19
|
+
import '../debarrel.js';
|
|
17
20
|
import 'esbuild';
|
|
21
|
+
import '../esm-shim-cjs-syntax.js';
|
|
18
22
|
import '@visulima/package';
|
|
23
|
+
import '../isolated-declarations/index.js';
|
|
19
24
|
import '@visulima/packem-share/types';
|
|
25
|
+
import '../jsx-remove-attributes.js';
|
|
26
|
+
import '../license.js';
|
|
27
|
+
import '../minify-html-literals/index.js';
|
|
28
|
+
import 'magic-string';
|
|
29
|
+
import 'html-minifier-next';
|
|
30
|
+
import '../native-modules-plugin.js';
|
|
20
31
|
import 'oxc-resolver';
|
|
21
32
|
import 'oxc-transform';
|
|
33
|
+
import '../raw.js';
|
|
34
|
+
import '../require-cjs-transformer.js';
|
|
35
|
+
import '../shebang.js';
|
|
36
|
+
import '../source-maps.js';
|
|
22
37
|
import 'sucrase';
|
|
23
|
-
import '
|
|
24
|
-
import 'html-minifier-next';
|
|
38
|
+
import '../url.js';
|
|
25
39
|
|
|
26
40
|
declare const isolatedDeclarationsTypescriptTransformer: (id: string, code: string, sourceMap?: boolean, transformOptions?: TranspileOptions) => Promise<IsolatedDeclarationsResult>;
|
|
27
41
|
|
|
28
|
-
declare const resolveTsconfigRootDirectories: (cwd: string, logger:
|
|
42
|
+
declare const resolveTsconfigRootDirectories: (cwd: string, logger: Console, tsconfig: TsConfigResult) => Plugin;
|
|
29
43
|
|
|
30
44
|
declare const resolveTypescriptMjsCts: () => Plugin;
|
|
31
45
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{default as s}from"../../packem_shared/isolatedDeclarationsTypescriptTransformer-DkuEkofo.js";import{patchTypescriptTypes as o,patchTypescriptTypes as p}from"../../packem_shared/patchTypescriptTypes-BX_sJsvd.js";import{resolveTsconfigPathsPlugin as i}from"../../packem_shared/resolveTsconfigPathsPlugin-CEasmDpi.js";import{default as l}from"../../packem_shared/resolveTsconfigRootDirectoriesPlugin-Cwj3tqCJ.js";import{default as T}from"../../packem_shared/resolveTypescriptMjsCtsPlugin-DcZrZTmM.js";export{s as isolatedDeclarationsTypescriptTransformer,o as patchTypescriptTypes,p as patchTypescriptTypesPlugin,i as resolveTsconfigPathsPlugin,l as resolveTsconfigRootDirectoriesPlugin,T as resolveTypescriptMjsCtsPlugin};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FilterPattern } from '@rollup/pluginutils';
|
|
2
|
+
import { Plugin } from 'rollup';
|
|
3
|
+
|
|
4
|
+
interface UrlOptions {
|
|
5
|
+
destDir?: string;
|
|
6
|
+
emitFiles: boolean;
|
|
7
|
+
exclude?: FilterPattern;
|
|
8
|
+
fileName: string;
|
|
9
|
+
include?: FilterPattern;
|
|
10
|
+
limit: number;
|
|
11
|
+
publicPath?: string;
|
|
12
|
+
sourceDir?: string;
|
|
13
|
+
}
|
|
14
|
+
declare const urlPlugin: ({ destDir: destinationDirectory, emitFiles, exclude, fileName, include, limit, publicPath, sourceDir: sourceDirectory, }: UrlOptions) => Plugin;
|
|
15
|
+
|
|
16
|
+
export { urlPlugin };
|
|
17
|
+
export type { UrlOptions };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var A=Object.defineProperty;var w=(t,a)=>A(t,"name",{value:a,configurable:!0});import D from"node:crypto";import{createReadStream as S,createWriteStream as j}from"node:fs";import{stat as k,readFile as E}from"node:fs/promises";import{createFilter as O}from"@rollup/pluginutils";import{ensureDir as y}from"@visulima/fs";import{extname as R,basename as P,relative as W,dirname as c,join as u}from"@visulima/path";import{R as z}from"../packem_shared/index-QEzU3Fey.js";import{svgEncoder as B}from"@visulima/packem-share/utils";var C=Object.defineProperty,b=w((t,a)=>C(t,"name",{value:a,configurable:!0}),"g");const H=b(async(t,a)=>{await new Promise((p,m)=>{const s=S(t);s.on("error",m);const i=j(a);i.on("error",m),i.on("finish",()=>p(void 0)),s.pipe(i)})},"copy"),M=b(({destDir:t,emitFiles:a,exclude:p,fileName:m,include:s,limit:i,publicPath:x,sourceDir:f})=>{const F=O(s,p),d={};return{async generateBundle(e){if(!a)return;const l=t??e.dir??c(e.file??"");await y(l),await Promise.all(Object.keys(d).map(async n=>{const r=d[n],o=u(l,c(r));await y(o),await H(n,u(l,r))}))},async load(e){if(!F(e))return;this.addWatchFile(e);const[l,n]=await Promise.all([k(e),E(e)]);let r;if(i&&l.size>i||i===0){const o=D.createHash("sha1").update(n).digest("hex").slice(0,16),g=R(e),$=P(e,g),h=f?W(f,c(e)):P(c(e)),v=m.replaceAll("[hash]",o).replaceAll("[extname]",g).replaceAll("[dirname]",h===""?"":`${h}/`).replaceAll("[name]",$);r=u(x??"",v),d[e]=v}else{const o=z.getType(e);if(o===void 0)throw new Error(`Could not determine mimetype for ${e}`);r=o==="image/svg+xml"?B(n):n.toString("base64"),r=`data:${o};base64,${r}`}return`export default "${r}"`},name:"packem:url"}},"urlPlugin");export{M as urlPlugin};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visulima/packem-rollup",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.24",
|
|
4
4
|
"description": "Rollup plugins for packem",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"visulima",
|
|
@@ -34,32 +34,100 @@
|
|
|
34
34
|
"type": "module",
|
|
35
35
|
"exports": {
|
|
36
36
|
".": {
|
|
37
|
-
"types": "./dist/index.d.
|
|
38
|
-
"default": "./dist/index.
|
|
37
|
+
"types": "./dist/index.d.ts",
|
|
38
|
+
"default": "./dist/index.js"
|
|
39
39
|
},
|
|
40
40
|
"./esbuild": {
|
|
41
|
-
"types": "./dist/plugins/esbuild/index.d.
|
|
42
|
-
"default": "./dist/plugins/esbuild/index.
|
|
41
|
+
"types": "./dist/plugins/esbuild/index.d.ts",
|
|
42
|
+
"default": "./dist/plugins/esbuild/index.js"
|
|
43
43
|
},
|
|
44
44
|
"./swc": {
|
|
45
|
-
"types": "./dist/plugins/swc/index.d.
|
|
46
|
-
"default": "./dist/plugins/swc/index.
|
|
45
|
+
"types": "./dist/plugins/swc/index.d.ts",
|
|
46
|
+
"default": "./dist/plugins/swc/index.js"
|
|
47
47
|
},
|
|
48
48
|
"./typescript": {
|
|
49
|
-
"types": "./dist/plugins/typescript/index.d.
|
|
50
|
-
"default": "./dist/plugins/typescript/index.
|
|
49
|
+
"types": "./dist/plugins/typescript/index.d.ts",
|
|
50
|
+
"default": "./dist/plugins/typescript/index.js"
|
|
51
51
|
},
|
|
52
52
|
"./oxc": {
|
|
53
|
-
"types": "./dist/plugins/oxc/index.d.
|
|
54
|
-
"default": "./dist/plugins/oxc/index.
|
|
53
|
+
"types": "./dist/plugins/oxc/index.d.ts",
|
|
54
|
+
"default": "./dist/plugins/oxc/index.js"
|
|
55
55
|
},
|
|
56
56
|
"./sucrase": {
|
|
57
|
-
"types": "./dist/plugins/sucrase/index.d.
|
|
58
|
-
"default": "./dist/plugins/sucrase/index.
|
|
57
|
+
"types": "./dist/plugins/sucrase/index.d.ts",
|
|
58
|
+
"default": "./dist/plugins/sucrase/index.js"
|
|
59
59
|
},
|
|
60
|
-
"./minify-html-literals": {
|
|
61
|
-
"types": "./dist/plugins/minify-html-literals/index.d.
|
|
62
|
-
"default": "./dist/plugins/minify-html-literals/index.
|
|
60
|
+
"./plugin/minify-html-literals": {
|
|
61
|
+
"types": "./dist/plugins/minify-html-literals/index.d.ts",
|
|
62
|
+
"default": "./dist/plugins/minify-html-literals/index.js"
|
|
63
|
+
},
|
|
64
|
+
"./plugin/require-cjs-transformer": {
|
|
65
|
+
"types": "./dist/plugins/require-cjs-transformer.d.ts",
|
|
66
|
+
"default": "./dist/plugins/require-cjs-transformer.js"
|
|
67
|
+
},
|
|
68
|
+
"./plugin/cjs-interop": {
|
|
69
|
+
"types": "./dist/plugins/cjs-interop.d.ts",
|
|
70
|
+
"default": "./dist/plugins/cjs-interop.js"
|
|
71
|
+
},
|
|
72
|
+
"./plugin/copy": {
|
|
73
|
+
"types": "./dist/plugins/copy.d.ts",
|
|
74
|
+
"default": "./dist/plugins/copy.js"
|
|
75
|
+
},
|
|
76
|
+
"./plugin/data-uri": {
|
|
77
|
+
"types": "./dist/plugins/data-uri.d.ts",
|
|
78
|
+
"default": "./dist/plugins/data-uri.js"
|
|
79
|
+
},
|
|
80
|
+
"./plugin/debarrel": {
|
|
81
|
+
"types": "./dist/plugins/debarrel.d.ts",
|
|
82
|
+
"default": "./dist/plugins/debarrel.js"
|
|
83
|
+
},
|
|
84
|
+
"./plugin/esm-shim-cjs-syntax": {
|
|
85
|
+
"types": "./dist/plugins/esm-shim-cjs-syntax.d.ts",
|
|
86
|
+
"default": "./dist/plugins/esm-shim-cjs-syntax.js"
|
|
87
|
+
},
|
|
88
|
+
"./plugin/fix-dts-default-cjs-exports": {
|
|
89
|
+
"types": "./dist/plugins/fix-dts-default-cjs-exports.d.ts",
|
|
90
|
+
"default": "./dist/plugins/fix-dts-default-cjs-exports.js"
|
|
91
|
+
},
|
|
92
|
+
"./plugin/isolated-declarations": {
|
|
93
|
+
"types": "./dist/plugins/isolated-declarations/index.d.ts",
|
|
94
|
+
"default": "./dist/plugins/isolated-declarations/index.js"
|
|
95
|
+
},
|
|
96
|
+
"./plugin/jsx-remove-attributes": {
|
|
97
|
+
"types": "./dist/plugins/jsx-remove-attributes.d.ts",
|
|
98
|
+
"default": "./dist/plugins/jsx-remove-attributes.js"
|
|
99
|
+
},
|
|
100
|
+
"./plugin/license": {
|
|
101
|
+
"types": "./dist/plugins/license.d.ts",
|
|
102
|
+
"default": "./dist/plugins/license.js"
|
|
103
|
+
},
|
|
104
|
+
"./plugin/native-modules": {
|
|
105
|
+
"types": "./dist/plugins/native-modules-plugin.d.ts",
|
|
106
|
+
"default": "./dist/plugins/native-modules-plugin.js"
|
|
107
|
+
},
|
|
108
|
+
"./plugin/preserve-directives": {
|
|
109
|
+
"types": "./dist/plugins/preserve-directives.d.ts",
|
|
110
|
+
"default": "./dist/plugins/preserve-directives.js"
|
|
111
|
+
},
|
|
112
|
+
"./plugin/raw": {
|
|
113
|
+
"types": "./dist/plugins/raw.d.ts",
|
|
114
|
+
"default": "./dist/plugins/raw.js"
|
|
115
|
+
},
|
|
116
|
+
"./plugin/shebang": {
|
|
117
|
+
"types": "./dist/plugins/shebang.d.ts",
|
|
118
|
+
"default": "./dist/plugins/shebang.js"
|
|
119
|
+
},
|
|
120
|
+
"./plugin/source-maps": {
|
|
121
|
+
"types": "./dist/plugins/source-maps.d.ts",
|
|
122
|
+
"default": "./dist/plugins/source-maps.js"
|
|
123
|
+
},
|
|
124
|
+
"./plugin/url": {
|
|
125
|
+
"types": "./dist/plugins/url.d.ts",
|
|
126
|
+
"default": "./dist/plugins/url.js"
|
|
127
|
+
},
|
|
128
|
+
"./plugin/json": {
|
|
129
|
+
"types": "./dist/plugins/json.d.ts",
|
|
130
|
+
"default": "./dist/plugins/json.js"
|
|
63
131
|
},
|
|
64
132
|
"./package.json": "./package.json"
|
|
65
133
|
},
|
|
@@ -88,7 +156,7 @@
|
|
|
88
156
|
"cjs-module-lexer": "^2.1.0",
|
|
89
157
|
"clean-css": "^5.3.3",
|
|
90
158
|
"glob-parent": "6.0.2",
|
|
91
|
-
"html-minifier-next": "^
|
|
159
|
+
"html-minifier-next": "^3.1.0",
|
|
92
160
|
"magic-string": "0.30.19",
|
|
93
161
|
"mlly": "1.8.0",
|
|
94
162
|
"oxc-parser": "0.93.0",
|
|
@@ -131,7 +199,7 @@
|
|
|
131
199
|
}
|
|
132
200
|
},
|
|
133
201
|
"engines": {
|
|
134
|
-
"node": ">=
|
|
202
|
+
"node": ">=20.19.* <=25.*"
|
|
135
203
|
},
|
|
136
204
|
"publishConfig": {
|
|
137
205
|
"access": "public",
|