wesl-plugin 0.6.47 → 0.6.50
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/README.md +96 -70
- package/dist/{WeslPlugin-BhkB-CW-.js → WeslPlugin-DFbg7Qiu.mjs} +138 -60
- package/dist/WeslPluginOptions-DHLy1_Dm.d.mts +11 -0
- package/dist/{import-meta-resolve-CUFqnZwT.js → import-meta-resolve-CfcdqZRe.mjs} +35 -0
- package/dist/{pluginIndex.d.ts → pluginIndex.d.mts} +1 -1
- package/dist/{pluginIndex.js → pluginIndex.mjs} +2 -2
- package/dist/plugins/astro.d.mts +7 -0
- package/dist/plugins/{astro.js → astro.mjs} +1 -2
- package/dist/plugins/{esbuild.d.ts → esbuild.d.mts} +2 -2
- package/dist/plugins/{esbuild.js → esbuild.mjs} +1 -2
- package/dist/plugins/{farm.d.ts → farm.d.mts} +2 -2
- package/dist/plugins/farm.mjs +8 -0
- package/dist/plugins/{nuxt.d.ts → nuxt.d.mts} +2 -2
- package/dist/plugins/{nuxt.js → nuxt.mjs} +3 -4
- package/dist/plugins/{rollup.d.ts → rollup.d.mts} +2 -2
- package/dist/plugins/{rollup.js → rollup.mjs} +1 -2
- package/dist/plugins/rspack.d.mts +7 -0
- package/dist/plugins/{rspack.js → rspack.mjs} +1 -2
- package/dist/plugins/{vite.d.ts → vite.d.mts} +2 -2
- package/dist/{vite-BqdMYd8l.js → plugins/vite.mjs} +2 -2
- package/dist/plugins/{webpack.d.ts → webpack.d.mts} +2 -2
- package/dist/{webpack-D-jacRMO.js → plugins/webpack.mjs} +2 -2
- package/package.json +11 -11
- package/src/WeslPlugin.ts +40 -9
- package/src/WeslPluginOptions.ts +3 -0
- package/src/extensions/LinkExtension.ts +1 -1
- package/dist/WeslPluginOptions-BXvD7dWh.d.ts +0 -9
- package/dist/plugins/astro.d.ts +0 -7
- package/dist/plugins/farm.js +0 -9
- package/dist/plugins/rspack.d.ts +0 -7
- package/dist/plugins/vite.js +0 -5
- package/dist/plugins/webpack.js +0 -5
- /package/dist/{PluginExtension-DlhUTOLC.d.ts → PluginExtension-N4JBtncl.d.mts} +0 -0
package/README.md
CHANGED
|
@@ -1,109 +1,135 @@
|
|
|
1
|
-
#
|
|
1
|
+
# WESL Plugin
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/wesl-plugin)
|
|
4
4
|
[](https://wesl-lang.dev/)
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
in JavaScript bundlers to make using webgpu shaders more convenient.
|
|
6
|
+
Bundler plugin for importing `.wesl` and `.wgsl` shader files in JavaScript/TypeScript.
|
|
8
7
|
|
|
9
|
-
|
|
8
|
+
## Install
|
|
10
9
|
|
|
11
|
-
```ts
|
|
12
|
-
import linkConfig from "./shaders/app.wesl?link";
|
|
13
10
|
```
|
|
14
|
-
|
|
15
|
-
```ts
|
|
16
|
-
import linkConfig from "./shaders/app.wesl?static";
|
|
11
|
+
npm install wesl wesl-plugin
|
|
17
12
|
```
|
|
18
13
|
|
|
19
|
-
|
|
14
|
+
## Quick Start
|
|
20
15
|
|
|
21
|
-
|
|
16
|
+
### Build-time linking (?static)
|
|
17
|
+
|
|
18
|
+
Link shaders at build time for the smallest application bundle size.
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
// vite.config.ts
|
|
22
|
+
import { staticBuildExtension } from "wesl-plugin";
|
|
23
|
+
import viteWesl from "wesl-plugin/vite";
|
|
22
24
|
|
|
25
|
+
export default {
|
|
26
|
+
plugins: [viteWesl({ extensions: [staticBuildExtension] })]
|
|
27
|
+
};
|
|
23
28
|
```
|
|
24
|
-
|
|
25
|
-
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
// app.ts
|
|
32
|
+
import wgsl from "./shaders/main.wesl?static";
|
|
33
|
+
|
|
34
|
+
const module = device.createShaderModule({ code: wgsl });
|
|
26
35
|
```
|
|
27
36
|
|
|
28
|
-
###
|
|
37
|
+
### Runtime linking (?link)
|
|
29
38
|
|
|
30
|
-
|
|
39
|
+
Link shaders at runtime when you need dynamic conditions or constants:
|
|
31
40
|
|
|
32
41
|
```ts
|
|
33
|
-
|
|
34
|
-
import weslPlugin from "wesl-plugin/vite";
|
|
42
|
+
// vite.config.ts
|
|
35
43
|
import { linkBuildExtension } from "wesl-plugin";
|
|
44
|
+
import viteWesl from "wesl-plugin/vite";
|
|
36
45
|
|
|
37
|
-
|
|
38
|
-
plugins: [
|
|
46
|
+
export default {
|
|
47
|
+
plugins: [viteWesl({ extensions: [linkBuildExtension] })]
|
|
39
48
|
};
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
```ts
|
|
52
|
+
// app.ts
|
|
53
|
+
import { link } from "wesl";
|
|
54
|
+
import shaderConfig from "./shaders/main.wesl?link";
|
|
55
|
+
|
|
56
|
+
const linked = await link({
|
|
57
|
+
...shaderConfig,
|
|
58
|
+
conditions: { MOBILE: isMobileGPU },
|
|
59
|
+
constants: { num_lights: 4 }
|
|
60
|
+
});
|
|
40
61
|
|
|
41
|
-
|
|
62
|
+
const module = linked.createShaderModule(device, {});
|
|
42
63
|
```
|
|
43
64
|
|
|
44
|
-
|
|
45
|
-
wesl or wgsl shaders with a `?link` suffix and link them into WGSL at runtime.
|
|
65
|
+
## Other Bundlers
|
|
46
66
|
|
|
47
67
|
```ts
|
|
48
|
-
import
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
rootModuleName: "myVerts.wesl",
|
|
54
|
-
conditions: {mobileGPU: true}
|
|
55
|
-
});
|
|
56
|
-
const computeShader = await link({
|
|
57
|
-
...linkConfig,
|
|
58
|
-
rootModuleName: "myCompute.wesl",
|
|
59
|
-
constants: {num_lights: 1}
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
|
|
68
|
+
import viteWesl from "wesl-plugin/vite";
|
|
69
|
+
import esbuildWesl from "wesl-plugin/esbuild";
|
|
70
|
+
import rollupWesl from "wesl-plugin/rollup";
|
|
71
|
+
import webpackWesl from "wesl-plugin/webpack";
|
|
72
|
+
// Also: nuxt, farm, rspack, astro
|
|
63
73
|
```
|
|
64
74
|
|
|
65
|
-
|
|
75
|
+
## Extensions
|
|
76
|
+
|
|
77
|
+
Extensions enable different import suffixes:
|
|
78
|
+
|
|
79
|
+
| Extension | Suffix | Output | Use Case |
|
|
80
|
+
|-----------|--------|--------|----------|
|
|
81
|
+
| `staticBuildExtension` | `?static` | WGSL string | Build-time linking, simplest |
|
|
82
|
+
| `linkBuildExtension` | `?link` | LinkParams object | Runtime conditions/constants |
|
|
66
83
|
|
|
67
|
-
|
|
84
|
+
### Combining Extensions
|
|
68
85
|
|
|
69
|
-
```
|
|
70
|
-
import
|
|
71
|
-
import
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
86
|
+
```ts
|
|
87
|
+
import { staticBuildExtension, linkBuildExtension } from "wesl-plugin";
|
|
88
|
+
import viteWesl from "wesl-plugin/vite";
|
|
89
|
+
|
|
90
|
+
export default {
|
|
91
|
+
plugins: [viteWesl({
|
|
92
|
+
extensions: [staticBuildExtension, linkBuildExtension]
|
|
93
|
+
})]
|
|
94
|
+
};
|
|
77
95
|
```
|
|
78
96
|
|
|
79
|
-
|
|
97
|
+
### Conditions in Import Path
|
|
80
98
|
|
|
81
|
-
|
|
82
|
-
Reads the `wesl.toml` file to find local shader files and libraries,
|
|
83
|
-
Returns a `LinkParams` object ready to use for runtime linking.
|
|
99
|
+
For `?static`, you can specify conditions directly in the import:
|
|
84
100
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
101
|
+
```ts
|
|
102
|
+
import wgsl from "./app.wesl MOBILE=true DEBUG=false ?static";
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Configuration (wesl.toml)
|
|
106
|
+
|
|
107
|
+
The plugin reads `wesl.toml` to find shader files and dependencies:
|
|
89
108
|
|
|
90
|
-
|
|
109
|
+
```toml
|
|
110
|
+
weslFiles = ["shaders/**/*.wesl"]
|
|
111
|
+
weslRoot = "shaders"
|
|
112
|
+
dependencies = ["auto"] # Auto-detect from package.json
|
|
113
|
+
```
|
|
91
114
|
|
|
92
|
-
|
|
93
|
-
translate some wgsl `struct` elements into JavaScript and TypeScript.
|
|
94
|
-
Demonstrates to wesl-plugin extension authors how to connect
|
|
95
|
-
to the wesl-plugin, how to produce JavaScript, and how to produce TypeScript.
|
|
96
|
-
- **BindingLayoutExtension** - (_prototype_) import `?bindingLayout` to collect JavaScript
|
|
97
|
-
`BindingGroupLayout` objects.
|
|
98
|
-
Works in concert with the `bindingStructsPlugin` to translate a proposed new WGSL
|
|
99
|
-
feature for defining binding group layouts in shaders [#4957](https://github.com/gpuweb/gpuweb/issues/4957).
|
|
115
|
+
## Prototype Extensions
|
|
100
116
|
|
|
101
|
-
|
|
117
|
+
- **SimpleReflectExtension** - Demo for extension authors showing how to generate JS/TS from shader structs
|
|
118
|
+
- **BindingLayoutExtension** - Prototype for generating `BindGroupLayout` objects from shaders
|
|
102
119
|
|
|
103
|
-
|
|
120
|
+
## Writing Custom Extensions
|
|
104
121
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
122
|
+
```ts
|
|
123
|
+
import type { PluginExtension } from "wesl-plugin";
|
|
124
|
+
|
|
125
|
+
const myExtension: PluginExtension = {
|
|
126
|
+
extensionName: "myfeature", // enables ?myfeature imports
|
|
127
|
+
emitFn: async (shaderPath, api, conditions) => {
|
|
128
|
+
const sources = await api.weslSrc();
|
|
129
|
+
// Return JavaScript code as a string
|
|
130
|
+
return `export default ${JSON.stringify(sources)};`;
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
```
|
|
108
134
|
|
|
109
|
-
See [PluginExtension.ts](https://github.com/wgsl-tooling-wg/wesl-js/blob/
|
|
135
|
+
See [PluginExtension.ts](https://github.com/wgsl-tooling-wg/wesl-js/blob/main/tools/packages/wesl-plugin/src/PluginExtension.ts) for the full API.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as resolve } from "./import-meta-resolve-
|
|
1
|
+
import { t as resolve } from "./import-meta-resolve-CfcdqZRe.mjs";
|
|
2
2
|
import path, { posix, win32 } from "node:path";
|
|
3
3
|
import { RecordResolver, WeslParseError, filterMap, findUnboundIdents, npmNameVariations } from "wesl";
|
|
4
4
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
@@ -17,16 +17,18 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
17
17
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
18
18
|
var __getProtoOf = Object.getPrototypeOf;
|
|
19
19
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
20
|
-
var
|
|
21
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
22
|
-
};
|
|
20
|
+
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
23
21
|
var __copyProps = (to, from, except, desc) => {
|
|
24
|
-
if (from && typeof from === "object" || typeof from === "function")
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
23
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
24
|
+
key = keys[i];
|
|
25
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
26
|
+
__defProp(to, key, {
|
|
27
|
+
get: ((k) => from[k]).bind(null, key),
|
|
28
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
30
32
|
}
|
|
31
33
|
return to;
|
|
32
34
|
};
|
|
@@ -225,7 +227,7 @@ function expand_(str, isTop) {
|
|
|
225
227
|
}
|
|
226
228
|
|
|
227
229
|
//#endregion
|
|
228
|
-
//#region ../../node_modules/.pnpm/minimatch@10.
|
|
230
|
+
//#region ../../node_modules/.pnpm/minimatch@10.1.1/node_modules/minimatch/dist/esm/assert-valid-pattern.js
|
|
229
231
|
const MAX_PATTERN_LENGTH = 1024 * 64;
|
|
230
232
|
const assertValidPattern = (pattern) => {
|
|
231
233
|
if (typeof pattern !== "string") throw new TypeError("invalid pattern");
|
|
@@ -233,7 +235,7 @@ const assertValidPattern = (pattern) => {
|
|
|
233
235
|
};
|
|
234
236
|
|
|
235
237
|
//#endregion
|
|
236
|
-
//#region ../../node_modules/.pnpm/minimatch@10.
|
|
238
|
+
//#region ../../node_modules/.pnpm/minimatch@10.1.1/node_modules/minimatch/dist/esm/brace-expressions.js
|
|
237
239
|
const posixClasses = {
|
|
238
240
|
"[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", true],
|
|
239
241
|
"[:alpha:]": ["\\p{L}\\p{Nl}", true],
|
|
@@ -355,27 +357,33 @@ const parseClass = (glob$1, position) => {
|
|
|
355
357
|
};
|
|
356
358
|
|
|
357
359
|
//#endregion
|
|
358
|
-
//#region ../../node_modules/.pnpm/minimatch@10.
|
|
360
|
+
//#region ../../node_modules/.pnpm/minimatch@10.1.1/node_modules/minimatch/dist/esm/unescape.js
|
|
359
361
|
/**
|
|
360
362
|
* Un-escape a string that has been escaped with {@link escape}.
|
|
361
363
|
*
|
|
362
|
-
* If the {@link windowsPathsNoEscape} option is used, then
|
|
363
|
-
* escapes are removed, but not backslash escapes.
|
|
364
|
-
*
|
|
365
|
-
*
|
|
364
|
+
* If the {@link MinimatchOptions.windowsPathsNoEscape} option is used, then
|
|
365
|
+
* square-bracket escapes are removed, but not backslash escapes.
|
|
366
|
+
*
|
|
367
|
+
* For example, it will turn the string `'[*]'` into `*`, but it will not
|
|
368
|
+
* turn `'\\*'` into `'*'`, because `\` is a path separator in
|
|
369
|
+
* `windowsPathsNoEscape` mode.
|
|
366
370
|
*
|
|
367
|
-
* When `windowsPathsNoEscape` is not set, then both
|
|
371
|
+
* When `windowsPathsNoEscape` is not set, then both square-bracket escapes and
|
|
368
372
|
* backslash escapes are removed.
|
|
369
373
|
*
|
|
370
374
|
* Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped
|
|
371
375
|
* or unescaped.
|
|
376
|
+
*
|
|
377
|
+
* When `magicalBraces` is not set, escapes of braces (`{` and `}`) will not be
|
|
378
|
+
* unescaped.
|
|
372
379
|
*/
|
|
373
|
-
const unescape = (s, { windowsPathsNoEscape = false } = {}) => {
|
|
374
|
-
return windowsPathsNoEscape ? s.replace(/\[([^\/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
|
|
380
|
+
const unescape = (s, { windowsPathsNoEscape = false, magicalBraces = true } = {}) => {
|
|
381
|
+
if (magicalBraces) return windowsPathsNoEscape ? s.replace(/\[([^\/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
|
|
382
|
+
return windowsPathsNoEscape ? s.replace(/\[([^\/\\{}])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\{}])\]/g, "$1$2").replace(/\\([^\/{}])/g, "$1");
|
|
375
383
|
};
|
|
376
384
|
|
|
377
385
|
//#endregion
|
|
378
|
-
//#region ../../node_modules/.pnpm/minimatch@10.
|
|
386
|
+
//#region ../../node_modules/.pnpm/minimatch@10.1.1/node_modules/minimatch/dist/esm/ast.js
|
|
379
387
|
const types = new Set([
|
|
380
388
|
"!",
|
|
381
389
|
"?",
|
|
@@ -620,7 +628,7 @@ var AST = class AST {
|
|
|
620
628
|
const dot = allowDot ?? !!this.#options.dot;
|
|
621
629
|
if (this.#root === this) this.#fillNegs();
|
|
622
630
|
if (!this.type) {
|
|
623
|
-
const noEmpty = this.isStart() && this.isEnd();
|
|
631
|
+
const noEmpty = this.isStart() && this.isEnd() && !this.#parts.some((s) => typeof s !== "string");
|
|
624
632
|
const src = this.#parts.map((p) => {
|
|
625
633
|
const [re, _, hasMagic$1, uflag] = typeof p === "string" ? AST.#parseGlob(p, this.#hasMagic, noEmpty) : p.toRegExpSource(allowDot);
|
|
626
634
|
this.#hasMagic = this.#hasMagic || hasMagic$1;
|
|
@@ -715,8 +723,7 @@ var AST = class AST {
|
|
|
715
723
|
}
|
|
716
724
|
}
|
|
717
725
|
if (c === "*") {
|
|
718
|
-
|
|
719
|
-
else re += star$1;
|
|
726
|
+
re += noEmpty && glob$1 === "*" ? starNoEmpty : star$1;
|
|
720
727
|
hasMagic$1 = true;
|
|
721
728
|
continue;
|
|
722
729
|
}
|
|
@@ -737,22 +744,26 @@ var AST = class AST {
|
|
|
737
744
|
};
|
|
738
745
|
|
|
739
746
|
//#endregion
|
|
740
|
-
//#region ../../node_modules/.pnpm/minimatch@10.
|
|
747
|
+
//#region ../../node_modules/.pnpm/minimatch@10.1.1/node_modules/minimatch/dist/esm/escape.js
|
|
741
748
|
/**
|
|
742
749
|
* Escape all magic characters in a glob pattern.
|
|
743
750
|
*
|
|
744
|
-
* If the {@link
|
|
751
|
+
* If the {@link MinimatchOptions.windowsPathsNoEscape}
|
|
745
752
|
* option is used, then characters are escaped by wrapping in `[]`, because
|
|
746
753
|
* a magic character wrapped in a character class can only be satisfied by
|
|
747
754
|
* that exact character. In this mode, `\` is _not_ escaped, because it is
|
|
748
755
|
* not interpreted as a magic character, but instead as a path separator.
|
|
756
|
+
*
|
|
757
|
+
* If the {@link MinimatchOptions.magicalBraces} option is used,
|
|
758
|
+
* then braces (`{` and `}`) will be escaped.
|
|
749
759
|
*/
|
|
750
|
-
const escape = (s, { windowsPathsNoEscape = false } = {}) => {
|
|
760
|
+
const escape = (s, { windowsPathsNoEscape = false, magicalBraces = false } = {}) => {
|
|
761
|
+
if (magicalBraces) return windowsPathsNoEscape ? s.replace(/[?*()[\]{}]/g, "[$&]") : s.replace(/[?*()[\]\\{}]/g, "\\$&");
|
|
751
762
|
return windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&");
|
|
752
763
|
};
|
|
753
764
|
|
|
754
765
|
//#endregion
|
|
755
|
-
//#region ../../node_modules/.pnpm/minimatch@10.
|
|
766
|
+
//#region ../../node_modules/.pnpm/minimatch@10.1.1/node_modules/minimatch/dist/esm/index.js
|
|
756
767
|
const minimatch = (p, pattern, options = {}) => {
|
|
757
768
|
assertValidPattern(pattern);
|
|
758
769
|
if (!options.nocomment && pattern.charAt(0) === "#") return false;
|
|
@@ -1259,16 +1270,23 @@ var Minimatch = class {
|
|
|
1259
1270
|
if (p !== GLOBSTAR || prev === GLOBSTAR) return;
|
|
1260
1271
|
if (prev === void 0) if (next !== void 0 && next !== GLOBSTAR) pp[i + 1] = "(?:\\/|" + twoStar + "\\/)?" + next;
|
|
1261
1272
|
else pp[i] = twoStar;
|
|
1262
|
-
else if (next === void 0) pp[i - 1] = prev + "(
|
|
1273
|
+
else if (next === void 0) pp[i - 1] = prev + "(?:\\/|\\/" + twoStar + ")?";
|
|
1263
1274
|
else if (next !== GLOBSTAR) {
|
|
1264
1275
|
pp[i - 1] = prev + "(?:\\/|\\/" + twoStar + "\\/)" + next;
|
|
1265
1276
|
pp[i + 1] = GLOBSTAR;
|
|
1266
1277
|
}
|
|
1267
1278
|
});
|
|
1268
|
-
|
|
1279
|
+
const filtered = pp.filter((p) => p !== GLOBSTAR);
|
|
1280
|
+
if (this.partial && filtered.length >= 1) {
|
|
1281
|
+
const prefixes = [];
|
|
1282
|
+
for (let i = 1; i <= filtered.length; i++) prefixes.push(filtered.slice(0, i).join("/"));
|
|
1283
|
+
return "(?:" + prefixes.join("|") + ")";
|
|
1284
|
+
}
|
|
1285
|
+
return filtered.join("/");
|
|
1269
1286
|
}).join("|");
|
|
1270
1287
|
const [open, close] = set.length > 1 ? ["(?:", ")"] : ["", ""];
|
|
1271
1288
|
re = "^" + open + re + close + "$";
|
|
1289
|
+
if (this.partial) re = "^(?:\\/|" + open + re.slice(1, -1) + close + ")$";
|
|
1272
1290
|
if (this.negate) re = "^(?!" + re + ").+$";
|
|
1273
1291
|
try {
|
|
1274
1292
|
this.regexp = new RegExp(re, [...flags].join(""));
|
|
@@ -1319,7 +1337,7 @@ minimatch.escape = escape;
|
|
|
1319
1337
|
minimatch.unescape = unescape;
|
|
1320
1338
|
|
|
1321
1339
|
//#endregion
|
|
1322
|
-
//#region ../../node_modules/.pnpm/lru-cache@11.2.
|
|
1340
|
+
//#region ../../node_modules/.pnpm/lru-cache@11.2.4/node_modules/lru-cache/dist/esm/index.js
|
|
1323
1341
|
/**
|
|
1324
1342
|
* @module LRUCache
|
|
1325
1343
|
*/
|
|
@@ -1506,6 +1524,7 @@ var LRUCache = class LRUCache {
|
|
|
1506
1524
|
#sizes;
|
|
1507
1525
|
#starts;
|
|
1508
1526
|
#ttls;
|
|
1527
|
+
#autopurgeTimers;
|
|
1509
1528
|
#hasDispose;
|
|
1510
1529
|
#hasFetchMethod;
|
|
1511
1530
|
#hasDisposeAfter;
|
|
@@ -1523,6 +1542,7 @@ var LRUCache = class LRUCache {
|
|
|
1523
1542
|
return {
|
|
1524
1543
|
starts: c.#starts,
|
|
1525
1544
|
ttls: c.#ttls,
|
|
1545
|
+
autopurgeTimers: c.#autopurgeTimers,
|
|
1526
1546
|
sizes: c.#sizes,
|
|
1527
1547
|
keyMap: c.#keyMap,
|
|
1528
1548
|
keyList: c.#keyList,
|
|
@@ -1684,15 +1704,23 @@ var LRUCache = class LRUCache {
|
|
|
1684
1704
|
const starts = new ZeroArray(this.#max);
|
|
1685
1705
|
this.#ttls = ttls;
|
|
1686
1706
|
this.#starts = starts;
|
|
1707
|
+
const purgeTimers = this.ttlAutopurge ? new Array(this.#max) : void 0;
|
|
1708
|
+
this.#autopurgeTimers = purgeTimers;
|
|
1687
1709
|
this.#setItemTTL = (index, ttl, start = this.#perf.now()) => {
|
|
1688
1710
|
starts[index] = ttl !== 0 ? start : 0;
|
|
1689
1711
|
ttls[index] = ttl;
|
|
1690
|
-
if (
|
|
1712
|
+
if (purgeTimers?.[index]) {
|
|
1713
|
+
clearTimeout(purgeTimers[index]);
|
|
1714
|
+
purgeTimers[index] = void 0;
|
|
1715
|
+
}
|
|
1716
|
+
if (ttl !== 0 && purgeTimers) {
|
|
1691
1717
|
const t = setTimeout(() => {
|
|
1692
1718
|
if (this.#isStale(index)) this.#delete(this.#keyList[index], "expire");
|
|
1693
1719
|
}, ttl + 1);
|
|
1694
1720
|
/* c8 ignore start */
|
|
1695
1721
|
if (t.unref) t.unref();
|
|
1722
|
+
/* c8 ignore stop */
|
|
1723
|
+
purgeTimers[index] = t;
|
|
1696
1724
|
}
|
|
1697
1725
|
};
|
|
1698
1726
|
this.#updateItemAge = (index) => {
|
|
@@ -2141,6 +2169,10 @@ var LRUCache = class LRUCache {
|
|
|
2141
2169
|
]);
|
|
2142
2170
|
}
|
|
2143
2171
|
this.#removeItemSize(head);
|
|
2172
|
+
if (this.#autopurgeTimers?.[head]) {
|
|
2173
|
+
clearTimeout(this.#autopurgeTimers[head]);
|
|
2174
|
+
this.#autopurgeTimers[head] = void 0;
|
|
2175
|
+
}
|
|
2144
2176
|
if (free) {
|
|
2145
2177
|
this.#keyList[head] = void 0;
|
|
2146
2178
|
this.#valList[head] = void 0;
|
|
@@ -2354,7 +2386,7 @@ var LRUCache = class LRUCache {
|
|
|
2354
2386
|
memo(k, memoOptions = {}) {
|
|
2355
2387
|
const memoMethod = this.#memoMethod;
|
|
2356
2388
|
if (!memoMethod) throw new Error("no memoMethod provided to constructor");
|
|
2357
|
-
const { context, forceRefresh
|
|
2389
|
+
const { context, forceRefresh, ...options } = memoOptions;
|
|
2358
2390
|
const v = this.get(k, options);
|
|
2359
2391
|
if (!forceRefresh && v !== void 0) return v;
|
|
2360
2392
|
const vv = memoMethod(k, v, {
|
|
@@ -2421,6 +2453,10 @@ var LRUCache = class LRUCache {
|
|
|
2421
2453
|
if (this.#size !== 0) {
|
|
2422
2454
|
const index = this.#keyMap.get(k);
|
|
2423
2455
|
if (index !== void 0) {
|
|
2456
|
+
if (this.#autopurgeTimers?.[index]) {
|
|
2457
|
+
clearTimeout(this.#autopurgeTimers?.[index]);
|
|
2458
|
+
this.#autopurgeTimers[index] = void 0;
|
|
2459
|
+
}
|
|
2424
2460
|
deleted = true;
|
|
2425
2461
|
if (this.#size === 1) this.#clear(reason);
|
|
2426
2462
|
else {
|
|
@@ -2484,6 +2520,8 @@ var LRUCache = class LRUCache {
|
|
|
2484
2520
|
if (this.#ttls && this.#starts) {
|
|
2485
2521
|
this.#ttls.fill(0);
|
|
2486
2522
|
this.#starts.fill(0);
|
|
2523
|
+
for (const t of this.#autopurgeTimers ?? []) if (t !== void 0) clearTimeout(t);
|
|
2524
|
+
this.#autopurgeTimers?.fill(void 0);
|
|
2487
2525
|
}
|
|
2488
2526
|
if (this.#sizes) this.#sizes.fill(0);
|
|
2489
2527
|
this.#head = 0;
|
|
@@ -3318,7 +3356,7 @@ while (this[FLUSHCHUNK](this[BUFFERSHIFT]()) && this[BUFFER].length);
|
|
|
3318
3356
|
};
|
|
3319
3357
|
|
|
3320
3358
|
//#endregion
|
|
3321
|
-
//#region ../../node_modules/.pnpm/path-scurry@2.0.
|
|
3359
|
+
//#region ../../node_modules/.pnpm/path-scurry@2.0.1/node_modules/path-scurry/dist/esm/index.js
|
|
3322
3360
|
const realpathSync$2 = realpathSync$1.native;
|
|
3323
3361
|
const defaultFS = {
|
|
3324
3362
|
lstatSync,
|
|
@@ -3363,7 +3401,7 @@ const ENOREALPATH = 512;
|
|
|
3363
3401
|
const ENOCHILD = ENOENT | 576;
|
|
3364
3402
|
const TYPEMASK = 1023;
|
|
3365
3403
|
const entToType = (s) => s.isFile() ? IFREG : s.isDirectory() ? IFDIR : s.isSymbolicLink() ? IFLNK : s.isCharacterDevice() ? IFCHR : s.isBlockDevice() ? IFBLK : s.isSocket() ? IFSOCK : s.isFIFO() ? IFIFO : UNKNOWN;
|
|
3366
|
-
const normalizeCache =
|
|
3404
|
+
const normalizeCache = new LRUCache({ max: 2 ** 12 });
|
|
3367
3405
|
const normalize = (s) => {
|
|
3368
3406
|
const c = normalizeCache.get(s);
|
|
3369
3407
|
if (c) return c;
|
|
@@ -3371,7 +3409,7 @@ const normalize = (s) => {
|
|
|
3371
3409
|
normalizeCache.set(s, n);
|
|
3372
3410
|
return n;
|
|
3373
3411
|
};
|
|
3374
|
-
const normalizeNocaseCache =
|
|
3412
|
+
const normalizeNocaseCache = new LRUCache({ max: 2 ** 12 });
|
|
3375
3413
|
const normalizeNocase = (s) => {
|
|
3376
3414
|
const c = normalizeNocaseCache.get(s);
|
|
3377
3415
|
if (c) return c;
|
|
@@ -3545,6 +3583,7 @@ var PathBase = class {
|
|
|
3545
3583
|
get parentPath() {
|
|
3546
3584
|
return (this.parent || this).fullpath();
|
|
3547
3585
|
}
|
|
3586
|
+
/* c8 ignore start */
|
|
3548
3587
|
/**
|
|
3549
3588
|
* Deprecated alias for Dirent['parentPath'] Somewhat counterintuitively,
|
|
3550
3589
|
* this property refers to the *parent* path, not the path object itself.
|
|
@@ -3554,6 +3593,7 @@ var PathBase = class {
|
|
|
3554
3593
|
get path() {
|
|
3555
3594
|
return this.parentPath;
|
|
3556
3595
|
}
|
|
3596
|
+
/* c8 ignore stop */
|
|
3557
3597
|
/**
|
|
3558
3598
|
* Do not create new Path objects directly. They should always be accessed
|
|
3559
3599
|
* via the PathScurry class or other methods on the Path class.
|
|
@@ -4882,7 +4922,7 @@ const Path = process.platform === "win32" ? PathWin32 : PathPosix;
|
|
|
4882
4922
|
const PathScurry = process.platform === "win32" ? PathScurryWin32 : process.platform === "darwin" ? PathScurryDarwin : PathScurryPosix;
|
|
4883
4923
|
|
|
4884
4924
|
//#endregion
|
|
4885
|
-
//#region ../../node_modules/.pnpm/glob@
|
|
4925
|
+
//#region ../../node_modules/.pnpm/glob@13.0.0/node_modules/glob/dist/esm/pattern.js
|
|
4886
4926
|
const isPatternList = (pl) => pl.length >= 1;
|
|
4887
4927
|
const isGlobList = (gl) => gl.length >= 1;
|
|
4888
4928
|
/**
|
|
@@ -5045,7 +5085,7 @@ var Pattern = class Pattern {
|
|
|
5045
5085
|
};
|
|
5046
5086
|
|
|
5047
5087
|
//#endregion
|
|
5048
|
-
//#region ../../node_modules/.pnpm/glob@
|
|
5088
|
+
//#region ../../node_modules/.pnpm/glob@13.0.0/node_modules/glob/dist/esm/ignore.js
|
|
5049
5089
|
const defaultPlatform$1 = typeof process === "object" && process && typeof process.platform === "string" ? process.platform : "linux";
|
|
5050
5090
|
/**
|
|
5051
5091
|
* Class used to process ignored patterns
|
|
@@ -5117,7 +5157,7 @@ var Ignore = class {
|
|
|
5117
5157
|
};
|
|
5118
5158
|
|
|
5119
5159
|
//#endregion
|
|
5120
|
-
//#region ../../node_modules/.pnpm/glob@
|
|
5160
|
+
//#region ../../node_modules/.pnpm/glob@13.0.0/node_modules/glob/dist/esm/processor.js
|
|
5121
5161
|
/**
|
|
5122
5162
|
* A cache of which patterns have been processed for a given Path
|
|
5123
5163
|
*/
|
|
@@ -5310,7 +5350,13 @@ var Processor = class Processor {
|
|
|
5310
5350
|
};
|
|
5311
5351
|
|
|
5312
5352
|
//#endregion
|
|
5313
|
-
//#region ../../node_modules/.pnpm/glob@
|
|
5353
|
+
//#region ../../node_modules/.pnpm/glob@13.0.0/node_modules/glob/dist/esm/walker.js
|
|
5354
|
+
/**
|
|
5355
|
+
* Single-use utility classes to provide functionality to the {@link Glob}
|
|
5356
|
+
* methods.
|
|
5357
|
+
*
|
|
5358
|
+
* @module
|
|
5359
|
+
*/
|
|
5314
5360
|
const makeIgnore = (ignore, opts) => typeof ignore === "string" ? new Ignore([ignore], opts) : Array.isArray(ignore) ? new Ignore(ignore, opts) : ignore;
|
|
5315
5361
|
/**
|
|
5316
5362
|
* basic walking utilities that all the glob walker types use
|
|
@@ -5589,7 +5635,7 @@ var GlobStream = class extends GlobUtil {
|
|
|
5589
5635
|
};
|
|
5590
5636
|
|
|
5591
5637
|
//#endregion
|
|
5592
|
-
//#region ../../node_modules/.pnpm/glob@
|
|
5638
|
+
//#region ../../node_modules/.pnpm/glob@13.0.0/node_modules/glob/dist/esm/glob.js
|
|
5593
5639
|
const defaultPlatform = typeof process === "object" && process && typeof process.platform === "string" ? process.platform : "linux";
|
|
5594
5640
|
/**
|
|
5595
5641
|
* An object that can perform glob pattern traversals.
|
|
@@ -5776,7 +5822,7 @@ var Glob = class {
|
|
|
5776
5822
|
};
|
|
5777
5823
|
|
|
5778
5824
|
//#endregion
|
|
5779
|
-
//#region ../../node_modules/.pnpm/glob@
|
|
5825
|
+
//#region ../../node_modules/.pnpm/glob@13.0.0/node_modules/glob/dist/esm/has-magic.js
|
|
5780
5826
|
/**
|
|
5781
5827
|
* Return true if the patterns provided contain any magic glob characters,
|
|
5782
5828
|
* given the options provided.
|
|
@@ -5795,7 +5841,7 @@ const hasMagic = (pattern, options = {}) => {
|
|
|
5795
5841
|
};
|
|
5796
5842
|
|
|
5797
5843
|
//#endregion
|
|
5798
|
-
//#region ../../node_modules/.pnpm/glob@
|
|
5844
|
+
//#region ../../node_modules/.pnpm/glob@13.0.0/node_modules/glob/dist/esm/index.js
|
|
5799
5845
|
function globStreamSync(pattern, options = {}) {
|
|
5800
5846
|
return new Glob(pattern, options).streamSync();
|
|
5801
5847
|
}
|
|
@@ -5843,7 +5889,7 @@ glob.glob = glob;
|
|
|
5843
5889
|
|
|
5844
5890
|
//#endregion
|
|
5845
5891
|
//#region ../../node_modules/.pnpm/toml@3.0.0/node_modules/toml/lib/parser.js
|
|
5846
|
-
var require_parser = /* @__PURE__ */
|
|
5892
|
+
var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5847
5893
|
module.exports = (function() {
|
|
5848
5894
|
function peg$subclass(child, parent) {
|
|
5849
5895
|
function ctor() {
|
|
@@ -9478,11 +9524,11 @@ var require_parser = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/toml
|
|
|
9478
9524
|
parse
|
|
9479
9525
|
};
|
|
9480
9526
|
})();
|
|
9481
|
-
})
|
|
9527
|
+
}));
|
|
9482
9528
|
|
|
9483
9529
|
//#endregion
|
|
9484
9530
|
//#region ../../node_modules/.pnpm/toml@3.0.0/node_modules/toml/lib/compiler.js
|
|
9485
|
-
var require_compiler = /* @__PURE__ */
|
|
9531
|
+
var require_compiler = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
9486
9532
|
function compile(nodes) {
|
|
9487
9533
|
var assignedPaths = [];
|
|
9488
9534
|
var valueAssignments = [];
|
|
@@ -9606,18 +9652,18 @@ var require_compiler = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/to
|
|
|
9606
9652
|
}
|
|
9607
9653
|
}
|
|
9608
9654
|
module.exports = { compile };
|
|
9609
|
-
})
|
|
9655
|
+
}));
|
|
9610
9656
|
|
|
9611
9657
|
//#endregion
|
|
9612
9658
|
//#region ../../node_modules/.pnpm/toml@3.0.0/node_modules/toml/index.js
|
|
9613
|
-
var require_toml = /* @__PURE__ */
|
|
9659
|
+
var require_toml = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
9614
9660
|
var parser = require_parser();
|
|
9615
9661
|
var compiler = require_compiler();
|
|
9616
9662
|
module.exports = { parse: function(input) {
|
|
9617
9663
|
var nodes = parser.parse(input.toString());
|
|
9618
9664
|
return compiler.compile(nodes);
|
|
9619
9665
|
} };
|
|
9620
|
-
})
|
|
9666
|
+
}));
|
|
9621
9667
|
|
|
9622
9668
|
//#endregion
|
|
9623
9669
|
//#region ../wesl-tooling/src/LoadWeslToml.ts
|
|
@@ -9880,11 +9926,14 @@ function weslPlugin(options, meta) {
|
|
|
9880
9926
|
meta,
|
|
9881
9927
|
options
|
|
9882
9928
|
};
|
|
9929
|
+
const log = options.debug ? debugLog : noopLog;
|
|
9930
|
+
log("init", { extensions: options.extensions?.map((e) => e.extensionName) });
|
|
9883
9931
|
return {
|
|
9884
9932
|
name: "wesl-plugin",
|
|
9885
|
-
resolveId: buildResolver(options, context),
|
|
9886
|
-
load: buildLoader(context),
|
|
9933
|
+
resolveId: buildResolver(options, context, log),
|
|
9934
|
+
load: buildLoader(context, log),
|
|
9887
9935
|
watchChange(id, _change) {
|
|
9936
|
+
log("watchChange", { id });
|
|
9888
9937
|
if (id.endsWith("wesl.toml")) {
|
|
9889
9938
|
cache.weslToml = void 0;
|
|
9890
9939
|
cache.registry = void 0;
|
|
@@ -9905,15 +9954,18 @@ function pluginsByName(options) {
|
|
|
9905
9954
|
* or
|
|
9906
9955
|
* foo/bar.wesl COND=false ?static
|
|
9907
9956
|
*
|
|
9957
|
+
* Bundlers may add extra query params (e.g. Vite adds ?import for dynamic imports,
|
|
9958
|
+
* ?t=123 for cache busting), so we capture the full query and search within it.
|
|
9959
|
+
*
|
|
9908
9960
|
* someday it'd be nice to support import attributes like:
|
|
9909
9961
|
* import "foo.bar.wesl?static" with { COND: false};
|
|
9910
9962
|
* (but that doesn't seem supported to be supported in the the bundler plugins yet)
|
|
9911
9963
|
*/
|
|
9912
|
-
const pluginMatch = /(^^)?(?<baseId>.*\.w[eg]sl)(?<cond>(\s*\w+(=\w+)?\s*)*)\?(?<
|
|
9964
|
+
const pluginMatch = /(^^)?(?<baseId>.*\.w[eg]sl)(?<cond>(\s*\w+(=\w+)?\s*)*)\?(?<query>.+)$/;
|
|
9913
9965
|
const resolvedPrefix = "^^";
|
|
9914
9966
|
/** build plugin entry for 'resolverId'
|
|
9915
9967
|
* to validate our javascript virtual module imports (with e.g. ?static or ?link suffixes) */
|
|
9916
|
-
function buildResolver(options, context) {
|
|
9968
|
+
function buildResolver(options, context, log) {
|
|
9917
9969
|
const suffixes = pluginNames(options);
|
|
9918
9970
|
return resolver;
|
|
9919
9971
|
/**
|
|
@@ -9927,39 +9979,58 @@ function buildResolver(options, context) {
|
|
|
9927
9979
|
if (id.startsWith(resolvedPrefix)) return id;
|
|
9928
9980
|
if (id === context.weslToml) return id;
|
|
9929
9981
|
const matched = pluginSuffixMatch(id, suffixes);
|
|
9982
|
+
log("resolveId", {
|
|
9983
|
+
id,
|
|
9984
|
+
matched: !!matched,
|
|
9985
|
+
suffixes
|
|
9986
|
+
});
|
|
9930
9987
|
if (matched) {
|
|
9931
9988
|
const { importParams, baseId, pluginName } = matched;
|
|
9932
9989
|
const importerDir = path.dirname(importer);
|
|
9933
|
-
|
|
9990
|
+
const result = resolvedPrefix + path.join(importerDir, baseId) + importParams + "?" + pluginName;
|
|
9991
|
+
log("resolveId resolved", { result });
|
|
9992
|
+
return result;
|
|
9934
9993
|
}
|
|
9935
9994
|
return matched ? id : null;
|
|
9936
9995
|
}
|
|
9937
9996
|
}
|
|
9997
|
+
/** Find matching plugin suffix in query string (handles ?import&static, ?t=123&static, etc.) */
|
|
9938
9998
|
function pluginSuffixMatch(id, suffixes) {
|
|
9939
|
-
const
|
|
9940
|
-
const
|
|
9941
|
-
if (!
|
|
9999
|
+
const match$1 = id.match(pluginMatch);
|
|
10000
|
+
const query = match$1?.groups?.query;
|
|
10001
|
+
if (!query) return null;
|
|
10002
|
+
const segments = query.split("&");
|
|
10003
|
+
const pluginName = suffixes.find((s) => segments.includes(s));
|
|
10004
|
+
if (!pluginName) return null;
|
|
9942
10005
|
return {
|
|
9943
10006
|
pluginName,
|
|
9944
|
-
baseId:
|
|
9945
|
-
importParams:
|
|
10007
|
+
baseId: match$1.groups.baseId,
|
|
10008
|
+
importParams: match$1.groups?.cond
|
|
9946
10009
|
};
|
|
9947
10010
|
}
|
|
9948
10011
|
/** build plugin function for serving a javascript module in response to
|
|
9949
10012
|
* an import of of our virtual import modules. */
|
|
9950
|
-
function buildLoader(context) {
|
|
10013
|
+
function buildLoader(context, log) {
|
|
9951
10014
|
const { options } = context;
|
|
9952
10015
|
const suffixes = pluginNames(options);
|
|
9953
10016
|
const pluginsMap = pluginsByName(options);
|
|
9954
10017
|
return loader;
|
|
9955
10018
|
async function loader(id) {
|
|
9956
10019
|
const matched = pluginSuffixMatch(id, suffixes);
|
|
10020
|
+
log("load", {
|
|
10021
|
+
id,
|
|
10022
|
+
matched: matched?.pluginName ?? null
|
|
10023
|
+
});
|
|
9957
10024
|
if (matched) {
|
|
9958
10025
|
const buildPluginApi = buildApi(context, this);
|
|
9959
10026
|
const plugin = pluginsMap[matched.pluginName];
|
|
9960
10027
|
const { baseId, importParams } = matched;
|
|
9961
10028
|
const conditions = importParamsToConditions(importParams);
|
|
9962
10029
|
const shaderPath = baseId.startsWith(resolvedPrefix) ? baseId.slice(2) : baseId;
|
|
10030
|
+
log("load emitting", {
|
|
10031
|
+
shaderPath,
|
|
10032
|
+
conditions
|
|
10033
|
+
});
|
|
9963
10034
|
return await plugin.emitFn(shaderPath, buildPluginApi, conditions);
|
|
9964
10035
|
}
|
|
9965
10036
|
return null;
|
|
@@ -9981,6 +10052,13 @@ function importParamsToConditions(importParams) {
|
|
|
9981
10052
|
});
|
|
9982
10053
|
return Object.fromEntries(condEntries);
|
|
9983
10054
|
}
|
|
10055
|
+
function fmtDebugData(data) {
|
|
10056
|
+
return data ? " " + JSON.stringify(data) : "";
|
|
10057
|
+
}
|
|
10058
|
+
function debugLog(msg, data) {
|
|
10059
|
+
console.error(`[wesl-plugin] ${msg}${fmtDebugData(data)}`);
|
|
10060
|
+
}
|
|
10061
|
+
function noopLog() {}
|
|
9984
10062
|
const unplugin = createUnplugin((options, meta) => {
|
|
9985
10063
|
return weslPlugin(options, meta);
|
|
9986
10064
|
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { n as PluginExtension } from "./PluginExtension-N4JBtncl.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/WeslPluginOptions.d.ts
|
|
4
|
+
interface WeslPluginOptions {
|
|
5
|
+
weslToml?: string;
|
|
6
|
+
extensions?: PluginExtension[];
|
|
7
|
+
/** Log plugin activity to stderr for debugging */
|
|
8
|
+
debug?: boolean;
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { WeslPluginOptions as t };
|
|
@@ -8,6 +8,19 @@ import v8 from "node:v8";
|
|
|
8
8
|
import { format, inspect } from "node:util";
|
|
9
9
|
|
|
10
10
|
//#region ../../node_modules/.pnpm/import-meta-resolve@4.1.0/node_modules/import-meta-resolve/lib/errors.js
|
|
11
|
+
/**
|
|
12
|
+
* @typedef ErrnoExceptionFields
|
|
13
|
+
* @property {number | undefined} [errnode]
|
|
14
|
+
* @property {string | undefined} [code]
|
|
15
|
+
* @property {string | undefined} [path]
|
|
16
|
+
* @property {string | undefined} [syscall]
|
|
17
|
+
* @property {string | undefined} [url]
|
|
18
|
+
*
|
|
19
|
+
* @typedef {Error & ErrnoExceptionFields} ErrnoException
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* @typedef {(...parameters: Array<any>) => string} MessageFunction
|
|
23
|
+
*/
|
|
11
24
|
const own$1 = {}.hasOwnProperty;
|
|
12
25
|
const classRegExp = /^([A-Z][a-z\d]*)+$/;
|
|
13
26
|
const kTypes = new Set([
|
|
@@ -332,6 +345,20 @@ function determineSpecificType(value) {
|
|
|
332
345
|
|
|
333
346
|
//#endregion
|
|
334
347
|
//#region ../../node_modules/.pnpm/import-meta-resolve@4.1.0/node_modules/import-meta-resolve/lib/package-json-reader.js
|
|
348
|
+
/**
|
|
349
|
+
* @typedef {import('./errors.js').ErrnoException} ErrnoException
|
|
350
|
+
*
|
|
351
|
+
* @typedef {'commonjs' | 'module' | 'none'} PackageType
|
|
352
|
+
*
|
|
353
|
+
* @typedef PackageConfig
|
|
354
|
+
* @property {string} pjsonPath
|
|
355
|
+
* @property {boolean} exists
|
|
356
|
+
* @property {string | undefined} [main]
|
|
357
|
+
* @property {string | undefined} [name]
|
|
358
|
+
* @property {PackageType} type
|
|
359
|
+
* @property {Record<string, unknown> | undefined} [exports]
|
|
360
|
+
* @property {Record<string, unknown> | undefined} [imports]
|
|
361
|
+
*/
|
|
335
362
|
const hasOwnProperty$1 = {}.hasOwnProperty;
|
|
336
363
|
const { ERR_INVALID_PACKAGE_CONFIG: ERR_INVALID_PACKAGE_CONFIG$1 } = codes;
|
|
337
364
|
/** @type {Map<string, PackageConfig>} */
|
|
@@ -547,6 +574,11 @@ function getConditionsSet(conditions) {
|
|
|
547
574
|
|
|
548
575
|
//#endregion
|
|
549
576
|
//#region ../../node_modules/.pnpm/import-meta-resolve@4.1.0/node_modules/import-meta-resolve/lib/resolve.js
|
|
577
|
+
/**
|
|
578
|
+
* @typedef {import('node:fs').Stats} Stats
|
|
579
|
+
* @typedef {import('./errors.js').ErrnoException} ErrnoException
|
|
580
|
+
* @typedef {import('./package-json-reader.js').PackageConfig} PackageConfig
|
|
581
|
+
*/
|
|
550
582
|
const RegExpPrototypeSymbolReplace = RegExp.prototype[Symbol.replace];
|
|
551
583
|
const { ERR_NETWORK_IMPORT_DISALLOWED, ERR_INVALID_MODULE_SPECIFIER, ERR_INVALID_PACKAGE_CONFIG, ERR_INVALID_PACKAGE_TARGET, ERR_MODULE_NOT_FOUND, ERR_PACKAGE_IMPORT_NOT_DEFINED, ERR_PACKAGE_PATH_NOT_EXPORTED, ERR_UNSUPPORTED_DIR_IMPORT, ERR_UNSUPPORTED_RESOLVE_REQUEST } = codes;
|
|
552
584
|
const own = {}.hasOwnProperty;
|
|
@@ -1203,6 +1235,9 @@ function defaultResolve(specifier, context = {}) {
|
|
|
1203
1235
|
//#endregion
|
|
1204
1236
|
//#region ../../node_modules/.pnpm/import-meta-resolve@4.1.0/node_modules/import-meta-resolve/index.js
|
|
1205
1237
|
/**
|
|
1238
|
+
* @typedef {import('./lib/errors.js').ErrnoException} ErrnoException
|
|
1239
|
+
*/
|
|
1240
|
+
/**
|
|
1206
1241
|
* Match `import.meta.resolve` except that `parent` is required (you can pass
|
|
1207
1242
|
* `import.meta.url`).
|
|
1208
1243
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as PluginExtension, r as PluginExtensionApi, t as ExtensionEmitFn } from "./PluginExtension-
|
|
1
|
+
import { n as PluginExtension, r as PluginExtensionApi, t as ExtensionEmitFn } from "./PluginExtension-N4JBtncl.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/extensions/LinkExtension.d.ts
|
|
4
4
|
declare const linkBuildExtension: PluginExtension;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as resolve } from "./import-meta-resolve-
|
|
1
|
+
import { t as resolve } from "./import-meta-resolve-CfcdqZRe.mjs";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { link, noSuffix } from "wesl";
|
|
4
4
|
import url from "node:url";
|
|
@@ -17,7 +17,7 @@ async function emitLinkJs(baseId, api) {
|
|
|
17
17
|
const autoDeps = await api.weslDependencies();
|
|
18
18
|
const sanitizedDeps = autoDeps.map((dep) => dep.replaceAll("/", "_"));
|
|
19
19
|
const bundleImports = autoDeps.map((p, i) => `import ${sanitizedDeps[i]} from "${p}";`).join("\n");
|
|
20
|
-
const paramsName = `link${path.basename(rootModuleName)}Config`;
|
|
20
|
+
const paramsName = `link${path.basename(rootModuleName).replace(/\W/g, "_")}Config`;
|
|
21
21
|
const linkParams = {
|
|
22
22
|
rootModuleName,
|
|
23
23
|
weslSrc,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "../PluginExtension-N4JBtncl.mjs";
|
|
2
|
+
import { t as WeslPluginOptions } from "../WeslPluginOptions-DHLy1_Dm.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/plugins/astro.d.ts
|
|
5
|
+
declare const _default: (options: WeslPluginOptions) => any;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { _default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../PluginExtension-
|
|
2
|
-
import { t as WeslPluginOptions } from "../WeslPluginOptions-
|
|
1
|
+
import "../PluginExtension-N4JBtncl.mjs";
|
|
2
|
+
import { t as WeslPluginOptions } from "../WeslPluginOptions-DHLy1_Dm.mjs";
|
|
3
3
|
import * as esbuild0 from "esbuild";
|
|
4
4
|
|
|
5
5
|
//#region src/plugins/esbuild.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../PluginExtension-
|
|
2
|
-
import { t as WeslPluginOptions } from "../WeslPluginOptions-
|
|
1
|
+
import "../PluginExtension-N4JBtncl.mjs";
|
|
2
|
+
import { t as WeslPluginOptions } from "../WeslPluginOptions-DHLy1_Dm.mjs";
|
|
3
3
|
import * as _farmfe_core0 from "@farmfe/core";
|
|
4
4
|
|
|
5
5
|
//#region src/plugins/farm.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../PluginExtension-
|
|
2
|
-
import { t as WeslPluginOptions } from "../WeslPluginOptions-
|
|
1
|
+
import "../PluginExtension-N4JBtncl.mjs";
|
|
2
|
+
import { t as WeslPluginOptions } from "../WeslPluginOptions-DHLy1_Dm.mjs";
|
|
3
3
|
import * as _nuxt_schema0 from "@nuxt/schema";
|
|
4
4
|
|
|
5
5
|
//#region src/plugins/nuxt.d.ts
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import "../WeslPlugin-
|
|
2
|
-
import "
|
|
3
|
-
import
|
|
4
|
-
import { t as webpack_default } from "../webpack-D-jacRMO.js";
|
|
1
|
+
import "../WeslPlugin-DFbg7Qiu.mjs";
|
|
2
|
+
import vite_default from "./vite.mjs";
|
|
3
|
+
import webpack_default from "./webpack.mjs";
|
|
5
4
|
import { addVitePlugin, addWebpackPlugin, defineNuxtModule } from "@nuxt/kit";
|
|
6
5
|
import "@nuxt/schema";
|
|
7
6
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../PluginExtension-
|
|
2
|
-
import { t as WeslPluginOptions } from "../WeslPluginOptions-
|
|
1
|
+
import "../PluginExtension-N4JBtncl.mjs";
|
|
2
|
+
import { t as WeslPluginOptions } from "../WeslPluginOptions-DHLy1_Dm.mjs";
|
|
3
3
|
import * as rollup0 from "rollup";
|
|
4
4
|
|
|
5
5
|
//#region src/plugins/rollup.d.ts
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "../PluginExtension-N4JBtncl.mjs";
|
|
2
|
+
import { t as WeslPluginOptions } from "../WeslPluginOptions-DHLy1_Dm.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/plugins/rspack.d.ts
|
|
5
|
+
declare const _default: (options: WeslPluginOptions) => RspackPluginInstance;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { _default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../PluginExtension-
|
|
2
|
-
import { t as WeslPluginOptions } from "../WeslPluginOptions-
|
|
1
|
+
import "../PluginExtension-N4JBtncl.mjs";
|
|
2
|
+
import { t as WeslPluginOptions } from "../WeslPluginOptions-DHLy1_Dm.mjs";
|
|
3
3
|
import * as vite0 from "vite";
|
|
4
4
|
|
|
5
5
|
//#region src/plugins/vite.d.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as weslPlugin } from "
|
|
1
|
+
import { n as weslPlugin } from "../WeslPlugin-DFbg7Qiu.mjs";
|
|
2
2
|
import { createVitePlugin } from "unplugin";
|
|
3
3
|
|
|
4
4
|
//#region src/plugins/vite.ts
|
|
5
5
|
var vite_default = createVitePlugin(weslPlugin);
|
|
6
6
|
|
|
7
7
|
//#endregion
|
|
8
|
-
export { vite_default as
|
|
8
|
+
export { vite_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../PluginExtension-
|
|
2
|
-
import { t as WeslPluginOptions } from "../WeslPluginOptions-
|
|
1
|
+
import "../PluginExtension-N4JBtncl.mjs";
|
|
2
|
+
import { t as WeslPluginOptions } from "../WeslPluginOptions-DHLy1_Dm.mjs";
|
|
3
3
|
import * as webpack0 from "webpack";
|
|
4
4
|
|
|
5
5
|
//#region src/plugins/webpack.d.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as weslPlugin } from "
|
|
1
|
+
import { n as weslPlugin } from "../WeslPlugin-DFbg7Qiu.mjs";
|
|
2
2
|
import { createWebpackPlugin } from "unplugin";
|
|
3
3
|
|
|
4
4
|
//#region src/plugins/webpack.ts
|
|
5
5
|
var webpack_default = createWebpackPlugin(weslPlugin);
|
|
6
6
|
|
|
7
7
|
//#endregion
|
|
8
|
-
export { webpack_default as
|
|
8
|
+
export { webpack_default as default };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wesl-plugin",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.50",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"src",
|
|
@@ -9,23 +9,23 @@
|
|
|
9
9
|
],
|
|
10
10
|
"repository": "github:wgsl-tooling-wg/wesl-js",
|
|
11
11
|
"exports": {
|
|
12
|
-
".": "./dist/pluginIndex.
|
|
12
|
+
".": "./dist/pluginIndex.mjs",
|
|
13
13
|
"./suffixes": {
|
|
14
14
|
"types": "./src/defaultSuffixTypes.d.ts"
|
|
15
15
|
},
|
|
16
|
-
"./astro": "./dist/plugins/astro.
|
|
17
|
-
"./rspack": "./dist/plugins/rspack.
|
|
18
|
-
"./vite": "./dist/plugins/vite.
|
|
19
|
-
"./webpack": "./dist/plugins/webpack.
|
|
20
|
-
"./rollup": "./dist/plugins/rollup.
|
|
21
|
-
"./esbuild": "./dist/plugins/esbuild.
|
|
22
|
-
"./nuxt": "./dist/plugins/nuxt.
|
|
23
|
-
"./farm": "./dist/plugins/farm.
|
|
16
|
+
"./astro": "./dist/plugins/astro.mjs",
|
|
17
|
+
"./rspack": "./dist/plugins/rspack.mjs",
|
|
18
|
+
"./vite": "./dist/plugins/vite.mjs",
|
|
19
|
+
"./webpack": "./dist/plugins/webpack.mjs",
|
|
20
|
+
"./rollup": "./dist/plugins/rollup.mjs",
|
|
21
|
+
"./esbuild": "./dist/plugins/esbuild.mjs",
|
|
22
|
+
"./nuxt": "./dist/plugins/nuxt.mjs",
|
|
23
|
+
"./farm": "./dist/plugins/farm.mjs",
|
|
24
24
|
"./*": "./*"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"unplugin": "^2.3.5",
|
|
28
|
-
"wesl": "0.
|
|
28
|
+
"wesl": "0.7.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@nuxt/kit": "^3.17.6",
|
package/src/WeslPlugin.ts
CHANGED
|
@@ -50,6 +50,8 @@ export interface PluginContext {
|
|
|
50
50
|
weslToml?: string;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
+
type DebugLog = (msg: string, data?: Record<string, unknown>) => void;
|
|
54
|
+
|
|
53
55
|
/**
|
|
54
56
|
* A bundler plugin for processing WESL files.
|
|
55
57
|
*
|
|
@@ -66,12 +68,16 @@ export function weslPlugin(
|
|
|
66
68
|
): UnpluginOptions {
|
|
67
69
|
const cache: PluginCache = {};
|
|
68
70
|
const context: PluginContext = { cache, meta, options };
|
|
71
|
+
const log = options.debug ? debugLog : noopLog;
|
|
72
|
+
|
|
73
|
+
log("init", { extensions: options.extensions?.map(e => e.extensionName) });
|
|
69
74
|
|
|
70
75
|
return {
|
|
71
76
|
name: "wesl-plugin",
|
|
72
|
-
resolveId: buildResolver(options, context),
|
|
73
|
-
load: buildLoader(context),
|
|
77
|
+
resolveId: buildResolver(options, context, log),
|
|
78
|
+
load: buildLoader(context, log),
|
|
74
79
|
watchChange(id, _change) {
|
|
80
|
+
log("watchChange", { id });
|
|
75
81
|
if (id.endsWith("wesl.toml")) {
|
|
76
82
|
// The cache is shared for multiple imports
|
|
77
83
|
cache.weslToml = undefined;
|
|
@@ -100,12 +106,15 @@ function pluginsByName(
|
|
|
100
106
|
* or
|
|
101
107
|
* foo/bar.wesl COND=false ?static
|
|
102
108
|
*
|
|
109
|
+
* Bundlers may add extra query params (e.g. Vite adds ?import for dynamic imports,
|
|
110
|
+
* ?t=123 for cache busting), so we capture the full query and search within it.
|
|
111
|
+
*
|
|
103
112
|
* someday it'd be nice to support import attributes like:
|
|
104
113
|
* import "foo.bar.wesl?static" with { COND: false};
|
|
105
114
|
* (but that doesn't seem supported to be supported in the the bundler plugins yet)
|
|
106
115
|
*/
|
|
107
116
|
const pluginMatch =
|
|
108
|
-
/(^^)?(?<baseId>.*\.w[eg]sl)(?<cond>(\s*\w+(=\w+)?\s*)*)\?(?<
|
|
117
|
+
/(^^)?(?<baseId>.*\.w[eg]sl)(?<cond>(\s*\w+(=\w+)?\s*)*)\?(?<query>.+)$/;
|
|
109
118
|
|
|
110
119
|
const resolvedPrefix = "^^";
|
|
111
120
|
|
|
@@ -114,6 +123,7 @@ const resolvedPrefix = "^^";
|
|
|
114
123
|
function buildResolver(
|
|
115
124
|
options: WeslPluginOptions,
|
|
116
125
|
context: PluginContext,
|
|
126
|
+
log: DebugLog,
|
|
117
127
|
): Resolver {
|
|
118
128
|
const suffixes = pluginNames(options);
|
|
119
129
|
return resolver;
|
|
@@ -141,6 +151,7 @@ function buildResolver(
|
|
|
141
151
|
return id;
|
|
142
152
|
}
|
|
143
153
|
const matched = pluginSuffixMatch(id, suffixes);
|
|
154
|
+
log("resolveId", { id, matched: !!matched, suffixes });
|
|
144
155
|
if (matched) {
|
|
145
156
|
const { importParams, baseId, pluginName } = matched;
|
|
146
157
|
|
|
@@ -149,6 +160,7 @@ function buildResolver(
|
|
|
149
160
|
const pathToShader = path.join(importerDir, baseId);
|
|
150
161
|
const result =
|
|
151
162
|
resolvedPrefix + pathToShader + importParams + "?" + pluginName;
|
|
163
|
+
log("resolveId resolved", { result });
|
|
152
164
|
return result;
|
|
153
165
|
}
|
|
154
166
|
return matched ? id : null; // this case doesn't happen AFAIK
|
|
@@ -161,20 +173,27 @@ interface PluginMatch {
|
|
|
161
173
|
pluginName: string;
|
|
162
174
|
}
|
|
163
175
|
|
|
176
|
+
/** Find matching plugin suffix in query string (handles ?import&static, ?t=123&static, etc.) */
|
|
164
177
|
function pluginSuffixMatch(id: string, suffixes: string[]): PluginMatch | null {
|
|
165
|
-
const
|
|
166
|
-
const
|
|
167
|
-
if (!
|
|
178
|
+
const match = id.match(pluginMatch);
|
|
179
|
+
const query = match?.groups?.query;
|
|
180
|
+
if (!query) return null;
|
|
181
|
+
|
|
182
|
+
// Query params are &-separated; find one that matches a configured suffix
|
|
183
|
+
const segments = query.split("&");
|
|
184
|
+
const pluginName = suffixes.find(s => segments.includes(s));
|
|
185
|
+
if (!pluginName) return null;
|
|
186
|
+
|
|
168
187
|
return {
|
|
169
188
|
pluginName,
|
|
170
|
-
baseId:
|
|
171
|
-
importParams:
|
|
189
|
+
baseId: match.groups!.baseId,
|
|
190
|
+
importParams: match.groups?.cond,
|
|
172
191
|
};
|
|
173
192
|
}
|
|
174
193
|
|
|
175
194
|
/** build plugin function for serving a javascript module in response to
|
|
176
195
|
* an import of of our virtual import modules. */
|
|
177
|
-
function buildLoader(context: PluginContext): Loader {
|
|
196
|
+
function buildLoader(context: PluginContext, log: DebugLog): Loader {
|
|
178
197
|
const { options } = context;
|
|
179
198
|
const suffixes = pluginNames(options);
|
|
180
199
|
const pluginsMap = pluginsByName(options);
|
|
@@ -185,6 +204,7 @@ function buildLoader(context: PluginContext): Loader {
|
|
|
185
204
|
id: string,
|
|
186
205
|
) {
|
|
187
206
|
const matched = pluginSuffixMatch(id, suffixes);
|
|
207
|
+
log("load", { id, matched: matched?.pluginName ?? null });
|
|
188
208
|
if (matched) {
|
|
189
209
|
const buildPluginApi = buildApi(context, this);
|
|
190
210
|
const plugin = pluginsMap[matched.pluginName];
|
|
@@ -194,6 +214,7 @@ function buildLoader(context: PluginContext): Loader {
|
|
|
194
214
|
? baseId.slice(resolvedPrefix.length)
|
|
195
215
|
: baseId;
|
|
196
216
|
|
|
217
|
+
log("load emitting", { shaderPath, conditions });
|
|
197
218
|
return await plugin.emitFn(shaderPath, buildPluginApi, conditions);
|
|
198
219
|
}
|
|
199
220
|
|
|
@@ -226,6 +247,16 @@ function importParamsToConditions(
|
|
|
226
247
|
return conditions;
|
|
227
248
|
}
|
|
228
249
|
|
|
250
|
+
function fmtDebugData(data?: Record<string, unknown>): string {
|
|
251
|
+
return data ? " " + JSON.stringify(data) : "";
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
function debugLog(msg: string, data?: Record<string, unknown>): void {
|
|
255
|
+
console.error(`[wesl-plugin] ${msg}${fmtDebugData(data)}`);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
function noopLog(): void {}
|
|
259
|
+
|
|
229
260
|
export const unplugin = createUnplugin(
|
|
230
261
|
(options: WeslPluginOptions, meta: UnpluginContextMeta) => {
|
|
231
262
|
return weslPlugin(options, meta);
|
package/src/WeslPluginOptions.ts
CHANGED
|
@@ -32,7 +32,7 @@ async function emitLinkJs(
|
|
|
32
32
|
.map((p, i) => `import ${sanitizedDeps[i]} from "${p}";`)
|
|
33
33
|
.join("\n");
|
|
34
34
|
|
|
35
|
-
const rootName = path.basename(rootModuleName);
|
|
35
|
+
const rootName = path.basename(rootModuleName).replace(/\W/g, "_");
|
|
36
36
|
const paramsName = `link${rootName}Config`;
|
|
37
37
|
|
|
38
38
|
const linkParams: LinkParams = {
|
package/dist/plugins/astro.d.ts
DELETED
package/dist/plugins/farm.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { n as weslPlugin } from "../WeslPlugin-BhkB-CW-.js";
|
|
2
|
-
import "../import-meta-resolve-CUFqnZwT.js";
|
|
3
|
-
import { createFarmPlugin } from "unplugin";
|
|
4
|
-
|
|
5
|
-
//#region src/plugins/farm.ts
|
|
6
|
-
var farm_default = createFarmPlugin(weslPlugin);
|
|
7
|
-
|
|
8
|
-
//#endregion
|
|
9
|
-
export { farm_default as default };
|
package/dist/plugins/rspack.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import "../PluginExtension-DlhUTOLC.js";
|
|
2
|
-
import { t as WeslPluginOptions } from "../WeslPluginOptions-BXvD7dWh.js";
|
|
3
|
-
|
|
4
|
-
//#region src/plugins/rspack.d.ts
|
|
5
|
-
declare const _default: (options: WeslPluginOptions) => RspackPluginInstance;
|
|
6
|
-
//#endregion
|
|
7
|
-
export { _default as default };
|
package/dist/plugins/vite.js
DELETED
package/dist/plugins/webpack.js
DELETED
|
File without changes
|