unplugin-raw 0.4.5 → 0.5.0
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/dist/esbuild.d.ts +14 -9
- package/dist/index-DfjJYIkP.d.ts +24 -0
- package/dist/index.d.ts +2 -23
- package/dist/rolldown.d.ts +14 -9
- package/dist/rollup.d.ts +14 -9
- package/dist/rspack.d.ts +12 -9
- package/dist/vite.d.ts +14 -9
- package/dist/webpack.d.ts +12 -9
- package/package.json +12 -12
package/dist/esbuild.d.ts
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
import unplugin from
|
|
2
|
-
import 'unplugin';
|
|
3
|
-
import 'esbuild';
|
|
4
|
-
import 'unplugin-utils';
|
|
1
|
+
import { unplugin } from "./index-DfjJYIkP.js";
|
|
5
2
|
|
|
3
|
+
//#region src/esbuild.d.ts
|
|
6
4
|
/**
|
|
7
|
-
*
|
|
5
|
+
* Esbuild plugin
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* // esbuild.config.js
|
|
10
|
+
* import { build } from 'esbuild'
|
|
8
11
|
*
|
|
9
|
-
*
|
|
12
|
+
* build({
|
|
13
|
+
* plugins: [require('unplugin-raw/esbuild')()],
|
|
14
|
+
* })
|
|
15
|
+
* ```
|
|
10
16
|
*/
|
|
11
17
|
|
|
12
18
|
/**
|
|
@@ -22,6 +28,5 @@ import 'unplugin-utils';
|
|
|
22
28
|
* })
|
|
23
29
|
* ```
|
|
24
30
|
*/
|
|
25
|
-
declare const esbuild: typeof unplugin.esbuild;
|
|
26
|
-
|
|
27
|
-
export { esbuild as "\"module.exports\"", esbuild as default };
|
|
31
|
+
declare const esbuild: typeof unplugin.esbuild; //#endregion
|
|
32
|
+
export { esbuild as default, esbuild as "module.exports" };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { UnpluginInstance } from "unplugin";
|
|
2
|
+
import { FilterPattern } from "unplugin-utils";
|
|
3
|
+
import { Loader, TransformOptions } from "esbuild";
|
|
4
|
+
|
|
5
|
+
//#region src/core/options.d.ts
|
|
6
|
+
interface Options {
|
|
7
|
+
/** @default 'pre' */
|
|
8
|
+
enforce?: "pre" | "post" | undefined;
|
|
9
|
+
/** Transform */
|
|
10
|
+
transform?: {
|
|
11
|
+
/** @default [/\.[cm]?[jt]sx?$/] */
|
|
12
|
+
include?: FilterPattern;
|
|
13
|
+
/** @default [/node_modules/] */
|
|
14
|
+
exclude?: FilterPattern;
|
|
15
|
+
/** @default {} */
|
|
16
|
+
options?: TransformOptions;
|
|
17
|
+
};
|
|
18
|
+
} //#endregion
|
|
19
|
+
//#region src/index.d.ts
|
|
20
|
+
declare const unplugin: UnpluginInstance<Options | undefined, false>;
|
|
21
|
+
declare function guessLoader(id: string): Loader;
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
export { guessLoader as guessLoader$1, unplugin };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,23 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { FilterPattern } from 'unplugin-utils';
|
|
4
|
-
|
|
5
|
-
interface Options {
|
|
6
|
-
/** @default 'pre' */
|
|
7
|
-
enforce?: "pre" | "post" | undefined;
|
|
8
|
-
/** Transform */
|
|
9
|
-
transform?: {
|
|
10
|
-
/** @default [/\.[cm]?[jt]sx?$/] */
|
|
11
|
-
include?: FilterPattern
|
|
12
|
-
/** @default [/node_modules/] */
|
|
13
|
-
exclude?: FilterPattern
|
|
14
|
-
/** @default {} */
|
|
15
|
-
options?: TransformOptions
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
declare const unplugin: UnpluginInstance<Options | undefined, false>;
|
|
20
|
-
|
|
21
|
-
declare function guessLoader(id: string): Loader;
|
|
22
|
-
|
|
23
|
-
export { unplugin as default, guessLoader };
|
|
1
|
+
import { guessLoader$1 as guessLoader, unplugin } from "./index-DfjJYIkP.js";
|
|
2
|
+
export { unplugin as default, guessLoader };
|
package/dist/rolldown.d.ts
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
import unplugin from
|
|
2
|
-
import 'unplugin';
|
|
3
|
-
import 'esbuild';
|
|
4
|
-
import 'unplugin-utils';
|
|
1
|
+
import { unplugin } from "./index-DfjJYIkP.js";
|
|
5
2
|
|
|
3
|
+
//#region src/rolldown.d.ts
|
|
6
4
|
/**
|
|
7
|
-
*
|
|
5
|
+
* Rolldown plugin
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* // rolldown.config.js
|
|
10
|
+
* import Raw from 'unplugin-raw/rolldown'
|
|
8
11
|
*
|
|
9
|
-
*
|
|
12
|
+
* export default {
|
|
13
|
+
* plugins: [Raw()],
|
|
14
|
+
* }
|
|
15
|
+
* ```
|
|
10
16
|
*/
|
|
11
17
|
|
|
12
18
|
/**
|
|
@@ -22,6 +28,5 @@ import 'unplugin-utils';
|
|
|
22
28
|
* }
|
|
23
29
|
* ```
|
|
24
30
|
*/
|
|
25
|
-
declare const rolldown: typeof unplugin.rolldown;
|
|
26
|
-
|
|
27
|
-
export { rolldown as "\"module.exports\"", rolldown as default };
|
|
31
|
+
declare const rolldown: typeof unplugin.rolldown; //#endregion
|
|
32
|
+
export { rolldown as default, rolldown as "module.exports" };
|
package/dist/rollup.d.ts
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
import unplugin from
|
|
2
|
-
import 'unplugin';
|
|
3
|
-
import 'esbuild';
|
|
4
|
-
import 'unplugin-utils';
|
|
1
|
+
import { unplugin } from "./index-DfjJYIkP.js";
|
|
5
2
|
|
|
3
|
+
//#region src/rollup.d.ts
|
|
6
4
|
/**
|
|
7
|
-
*
|
|
5
|
+
* Rollup plugin
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* // rollup.config.js
|
|
10
|
+
* import Raw from 'unplugin-raw/rollup'
|
|
8
11
|
*
|
|
9
|
-
*
|
|
12
|
+
* export default {
|
|
13
|
+
* plugins: [Raw()],
|
|
14
|
+
* }
|
|
15
|
+
* ```
|
|
10
16
|
*/
|
|
11
17
|
|
|
12
18
|
/**
|
|
@@ -22,6 +28,5 @@ import 'unplugin-utils';
|
|
|
22
28
|
* }
|
|
23
29
|
* ```
|
|
24
30
|
*/
|
|
25
|
-
declare const rollup: typeof unplugin.rollup;
|
|
26
|
-
|
|
27
|
-
export { rollup as "\"module.exports\"", rollup as default };
|
|
31
|
+
declare const rollup: typeof unplugin.rollup; //#endregion
|
|
32
|
+
export { rollup as default, rollup as "module.exports" };
|
package/dist/rspack.d.ts
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import unplugin from
|
|
2
|
-
import 'unplugin';
|
|
3
|
-
import 'esbuild';
|
|
4
|
-
import 'unplugin-utils';
|
|
1
|
+
import { unplugin } from "./index-DfjJYIkP.js";
|
|
5
2
|
|
|
3
|
+
//#region src/rspack.d.ts
|
|
6
4
|
/**
|
|
7
|
-
*
|
|
5
|
+
* Rspack plugin
|
|
8
6
|
*
|
|
9
|
-
* @
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* // rspack.config.js
|
|
10
|
+
* module.exports = {
|
|
11
|
+
* plugins: [require('unplugin-raw/rspack')()],
|
|
12
|
+
* }
|
|
13
|
+
* ```
|
|
10
14
|
*/
|
|
11
15
|
|
|
12
16
|
/**
|
|
@@ -20,6 +24,5 @@ import 'unplugin-utils';
|
|
|
20
24
|
* }
|
|
21
25
|
* ```
|
|
22
26
|
*/
|
|
23
|
-
declare const rspack: typeof unplugin.rspack;
|
|
24
|
-
|
|
25
|
-
export { rspack as "\"module.exports\"", rspack as default };
|
|
27
|
+
declare const rspack: typeof unplugin.rspack; //#endregion
|
|
28
|
+
export { rspack as default, rspack as "module.exports" };
|
package/dist/vite.d.ts
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
import unplugin from
|
|
2
|
-
import 'unplugin';
|
|
3
|
-
import 'esbuild';
|
|
4
|
-
import 'unplugin-utils';
|
|
1
|
+
import { unplugin } from "./index-DfjJYIkP.js";
|
|
5
2
|
|
|
3
|
+
//#region src/vite.d.ts
|
|
6
4
|
/**
|
|
7
|
-
*
|
|
5
|
+
* Vite plugin
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* // vite.config.ts
|
|
10
|
+
* import Raw from 'unplugin-raw/vite'
|
|
8
11
|
*
|
|
9
|
-
*
|
|
12
|
+
* export default defineConfig({
|
|
13
|
+
* plugins: [Raw()],
|
|
14
|
+
* })
|
|
15
|
+
* ```
|
|
10
16
|
*/
|
|
11
17
|
|
|
12
18
|
/**
|
|
@@ -22,6 +28,5 @@ import 'unplugin-utils';
|
|
|
22
28
|
* })
|
|
23
29
|
* ```
|
|
24
30
|
*/
|
|
25
|
-
declare const vite: typeof unplugin.vite;
|
|
26
|
-
|
|
27
|
-
export { vite as "\"module.exports\"", vite as default };
|
|
31
|
+
declare const vite: typeof unplugin.vite; //#endregion
|
|
32
|
+
export { vite as default, vite as "module.exports" };
|
package/dist/webpack.d.ts
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import unplugin from
|
|
2
|
-
import 'unplugin';
|
|
3
|
-
import 'esbuild';
|
|
4
|
-
import 'unplugin-utils';
|
|
1
|
+
import { unplugin } from "./index-DfjJYIkP.js";
|
|
5
2
|
|
|
3
|
+
//#region src/webpack.d.ts
|
|
6
4
|
/**
|
|
7
|
-
*
|
|
5
|
+
* Webpack plugin
|
|
8
6
|
*
|
|
9
|
-
* @
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* // webpack.config.js
|
|
10
|
+
* module.exports = {
|
|
11
|
+
* plugins: [require('unplugin-raw/webpack')()],
|
|
12
|
+
* }
|
|
13
|
+
* ```
|
|
10
14
|
*/
|
|
11
15
|
|
|
12
16
|
/**
|
|
@@ -20,6 +24,5 @@ import 'unplugin-utils';
|
|
|
20
24
|
* }
|
|
21
25
|
* ```
|
|
22
26
|
*/
|
|
23
|
-
declare const webpack: typeof unplugin.webpack;
|
|
24
|
-
|
|
25
|
-
export { webpack as "\"module.exports\"", webpack as default };
|
|
27
|
+
declare const webpack: typeof unplugin.webpack; //#endregion
|
|
28
|
+
export { webpack as default, webpack as "module.exports" };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unplugin-raw",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Transform file to a default-export string.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -49,26 +49,26 @@
|
|
|
49
49
|
"access": "public"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"esbuild": "^0.25.
|
|
53
|
-
"unplugin": "^2.3.
|
|
52
|
+
"esbuild": "^0.25.4",
|
|
53
|
+
"unplugin": "^2.3.2",
|
|
54
54
|
"unplugin-utils": "^0.2.4"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@sxzz/eslint-config": "^
|
|
57
|
+
"@sxzz/eslint-config": "^7.0.0",
|
|
58
58
|
"@sxzz/prettier-config": "^2.2.1",
|
|
59
|
-
"@types/node": "^22.
|
|
59
|
+
"@types/node": "^22.15.17",
|
|
60
60
|
"bumpp": "^10.1.0",
|
|
61
|
-
"eslint": "^9.
|
|
61
|
+
"eslint": "^9.26.0",
|
|
62
62
|
"prettier": "^3.5.3",
|
|
63
|
-
"rollup": "^4.
|
|
64
|
-
"tsdown": "^0.
|
|
65
|
-
"tsx": "^4.19.
|
|
63
|
+
"rollup": "^4.40.2",
|
|
64
|
+
"tsdown": "^0.11.1",
|
|
65
|
+
"tsx": "^4.19.4",
|
|
66
66
|
"typescript": "^5.8.3",
|
|
67
|
-
"vite": "^6.
|
|
68
|
-
"vitest": "^3.1.
|
|
67
|
+
"vite": "^6.3.5",
|
|
68
|
+
"vitest": "^3.1.3"
|
|
69
69
|
},
|
|
70
70
|
"engines": {
|
|
71
|
-
"node": ">=18.
|
|
71
|
+
"node": ">=20.18.0"
|
|
72
72
|
},
|
|
73
73
|
"prettier": "@sxzz/prettier-config",
|
|
74
74
|
"scripts": {
|