vite-plugin-wat2wasm 2.0.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -49,7 +49,7 @@ or include it in your `tsconfig.json` file
49
49
  ### Using it in your application/library
50
50
 
51
51
  ``` ts
52
- import initFoo from "./foo.wat"
52
+ import initFoo from "./foo.wat";
53
53
 
54
54
  const bar = new WebAssembly.Global("i32", { value: 13 });
55
55
  const foo = await initFoo<FooExports, FooImports>({
@@ -83,7 +83,7 @@ This section contains more in-depth details about the `vite-plugin-wat2wasm` lib
83
83
 
84
84
  ### `wat2WasmPlugin`
85
85
 
86
- Enables compilation of `.wat` files and generation of `.wasm`, with modifiable settings.
86
+ Enables compilation of `.wat` files and generation of WebAssembly, with modifiable settings.
87
87
 
88
88
  `wat2WasmPlugin(options:` [`Wat2WasmOptions`](#wat2wasmoptions)`):`[`Plugin`](<https://vite.dev/guide/api-plugin>)
89
89
 
@@ -101,10 +101,14 @@ The configuration settings for `vite-plugin-wat2wasm`.
101
101
 
102
102
  #### Properties
103
103
 
104
- - `parser?:` [`WasmParserOptions`](#wasmparseroptions) `= {}` -
105
- Configures `.wasm` features you wish to enable for `vite-plugin-wat2wasm`.
104
+ - `inlineAssemblies?:` `boolean` `= false` - Whether to inline generated WebAssembly output within JavaScript files when transforming `.wat` files.
106
105
 
107
- - `generator?:` [`WasmGeneratorOptions`](#wasmgeneratoroptions) `= {}` - Configures how `vite-plugin-wat2wasm` to generate `.wasm` files.
106
+ - `parser?:` [`WasmParserOptions`](#wasmparseroptions) `= {}` - Configures WebAssembly features you wish to enable for `vite-plugin-wat2wasm`.
107
+ - `generator?:` [`WasmGeneratorOptions`](#wasmgeneratoroptions) `= {}` - Configures how `vite-plugin-wat2wasm` to generate WebAssembly output.
108
+
109
+ - `fetchTargets?:` [`FetchTarget`](#fetchtarget) `|` [`FetchTarget`](#fetchtarget)`[]` `= ["browser" | "node"]` - Determines the runtimes that can be targeted when the WebAssembly modules are fetched. Does not affect anything if `inlineAssemblies` is set to `true`.
110
+
111
+ - `utilDirPath?:` `string` - The directory path where utility functions used by JavaScript files to retrieve and interact with WebAssembly modules will be stored.
108
112
 
109
113
  ### `WasmParserOptions`
110
114
 
@@ -113,3 +117,12 @@ See [`wabt.WasmFeatures`](https://github.com/AssemblyScript/wabt.js/blob/main/RE
113
117
  ### `WasmGeneratorOptions`
114
118
 
115
119
  See [`wabt.ToBinaryOptions`](https://github.com/AssemblyScript/wabt.js/blob/main/README.md) for more info.
120
+
121
+ ### `FetchTarget`
122
+
123
+ The runtimes supported as targets when fetching WebAssembly modules.
124
+
125
+ #### List of Values
126
+
127
+ - `"browser"` - Enable support for browser-based runtimes.
128
+ - `"node"` - Enable support for Node-based runtimes.
package/dist/index.d.ts CHANGED
@@ -9,17 +9,24 @@ type WasmParserOptions = Parameters<WabtParserFunc>[2];
9
9
  type WasmGeneratorOptions = Parameters<ReturnType<WabtParserFunc>["toBinary"]>[0];
10
10
  /** The configuration settings for `vite-plugin-wat2wasm`. @see Wat2WasmOptions */
11
11
  interface Wat2WasmOptions {
12
- /** Configures `.wasm` features you wish to enable for `vite-plugin-wat2wasm`. @default {} @see {@link WasmParserOptions|`WasmParserOptions`} */
12
+ /** Whether to inline generated WebAssembly output within JavaScript files when transforming `.wat` files. */
13
+ inlineAssemblies?: boolean;
14
+ /** Configures WebAssembly features you wish to enable for `vite-plugin-wat2wasm`. @default {} @see {@link WasmParserOptions|`WasmParserOptions`} */
13
15
  parser?: WasmParserOptions;
14
- /** Configures how `vite-plugin-wat2wasm` to generate `.wasm` files. @default {} @see {@link WasmGeneratorOptions|`WasmGeneratorOptions`} */
16
+ /** Configures how `vite-plugin-wat2wasm` to generate WebAssembly output. @default {} @see {@link WasmGeneratorOptions|`WasmGeneratorOptions`} */
15
17
  generator?: WasmGeneratorOptions;
18
+ /** Determines the runtimes that can be targeted when the WebAssembly modules are fetched. Does not affect anything if `inlineAssemblies` is set to `true`. */
19
+ fetchTargets?: FetchTarget | FetchTarget[];
20
+ /** The directory path where utility functions used by JavaScript files to retrieve and interact with WebAssembly modules will be stored. */
21
+ utilDirPath?: string;
16
22
  }
17
- /** Enables compilation of `.wat` files and generation of `.wasm`, with modifiable settings.
23
+ type FetchTarget = "browser" | "node";
24
+ /** Enables compilation of `.wat` files and generation of WebAssembly, with modifiable settings.
18
25
  *
19
26
  * @param options - the configuration options for `vite-plugin-wat2wasm`. @see {@link Wat2WasmOptions|`Wat2WasmOptions`}
20
27
  * @returns a Vite plugin object that allows for compilation of `.wat` files. @see {@link https://vite.dev/guide/api-plugin|`Plugin`}
21
28
  */
22
29
  declare const wat2WasmPlugin: (options?: Wat2WasmOptions) => Plugin;
23
30
  //#endregion
24
- export { type WasmGeneratorOptions, type WasmParserOptions, type Wat2WasmOptions, wat2WasmPlugin as default };
31
+ export { type FetchTarget, type WasmGeneratorOptions, type WasmParserOptions, type Wat2WasmOptions, wat2WasmPlugin as default };
25
32
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -1,4 +1,23 @@
1
- import e from"wabt";const t=await e();var n=(e={})=>{let{parser:n={},generator:r={}}=e;return{name:`wat2wasm`,transform(e,i){if(!i.endsWith(`.wat`))return null;let a=t.parseWat(i,e,n).toBinary(r);r.log&&console.log(i+`
1
+ import e from"fs/promises";import t from"path";import n from"crypto";import r from"wabt";const i=await r();var a=(r={})=>{let{inlineAssemblies:a=!1,parser:o={},generator:s={},fetchTargets:c=[`browser`,`node`],utilDirPath:l=`./__wasm-utils`}=r,u=`wat2wasm:`+n.randomBytes(4).toString(`hex`),d=t.join(l,`fetchWasm.js`),f,p,m,h=c.includes(`browser`),g=c.includes(`node`),_={},v=!1,y=`export async function fetchWasm(filename, parentPath, imports) {
2
+ `+(h?` if (typeof window !== "undefined" && typeof document !== "undefined") return WebAssembly.instantiateStreaming(fetch(new URL(filename, parentPath)), imports);`:``)+`
3
+ `+(g?` if (typeof process !== "undefined" && "versions" in process && "node" in process.versions) return WebAssembly.instantiate(await (await import("fs/promises").then(({ readFile }) => readFile))(filename), imports);`:``)+`
2
4
 
3
- `,a.log);let o=a.buffer;return`export default async (imports = {}) => WebAssembly.instantiate(Uint8Array.from(atob("${btoa(String.fromCharCode(...o))}"), (char) => char.charCodeAt(0)), imports).then(({ instance: { exports } }) => exports);`}}};export{n as default};
5
+ throw new Error("The runtime used to import this WebAssembly module is not supported. If this is a mistake, adjust your fetchTargets to fit the specific runtime.");
6
+ }
7
+ `,b=(e,t)=>a||m?`
8
+ export default async (imports = {}) => {
9
+ const data = atob("${btoa(String.fromCharCode(...e))}");
10
+
11
+ const len = data.length;
12
+
13
+ const bfr = new Uint8Array(len);
14
+ for (let i = 0; i < len; i++) bfr[i] = data.charCodeAt(i);
15
+
16
+ return WebAssembly.instantiate(bfr).then((src) => src.instance.exports);
17
+ };
18
+ `:`
19
+ import { fetchWasm } from "${u}";
20
+ export default (imports = {}) => fetchWasm("${t}", import.meta.url, imports).then((src) => src.instance.exports);
21
+ `;return{name:`wat2wasm`,enforce:`pre`,transform(e,n){if(!n.endsWith(`.wat`))return null;n=n.replaceAll(`\\`,`/`);let r=t.relative(f,n),a=t.basename(n,`.wat`),c=i.parseWat(a+`.wat`,e,o).toBinary(s);s.log&&console.log(`\x1B[1;35m[plugin-wat2wasm]\x1B[0;39m \x1B[36mLog Output\x1B[39m - \x1B[92m`+r+`
22
+ \x1B[39m`+c.log);let l=c.buffer;return _[n]=l,b(l,a+`.wasm`)},generateBundle(e,n){if(!a)for(let[e,r]of Object.entries(n)){if(r.type===`asset`)continue;e=e.replaceAll(`\\`,`/`);let n=t.join(e,`../`),i=r.moduleIds;for(let e of i){if(e=e.replaceAll(`\\`,`/`),!(e in _))continue;let r=t.basename(e,`.wat`)+`.wasm`,i=t.join(n,r),a=_[e];this.emitFile({type:`asset`,source:a,fileName:i})}r.code=r.code.replaceAll(u,t.relative(n,d).replaceAll(`\\`,`/`))}},buildStart(){if(`data`in this){let e=this.data;f=(e.outputOptions.preserveModules?e.outputOptions.preserveModulesRoot:t.join(e.outputOptions.dir,`../`)).replaceAll(`\\`,`/`),p=e.outputOptions.dir.replaceAll(`\\`,`/`),m=!1}v=!(a||m)},async closeBundle(){if(v){let n=t.join(p,d).replaceAll(`\\`,`/`),r=t.join(n,`../`).replaceAll(`\\`,`/`);await e.mkdir(r,{recursive:!0}),await e.writeFile(n,y,`utf-8`)}},configResolved(e){f=e.root.replaceAll(`\\`,`/`),p=t.join(f,e.build.outDir).replaceAll(`\\`,`/`),m=e.command===`serve`}}};export{a as default};
4
23
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["import type { Plugin } from \"vite\";\r\nimport initWabt from \"wabt\";\r\n\r\nconst wabt = await initWabt();\r\n\r\ntype WabtParserFunc = Awaited<ReturnType<typeof initWabt>>[\"parseWat\"];\r\n\r\n/** See @see {@link https://github.com/AssemblyScript/wabt.js/blob/main/README.md|`wabt.WasmFeatures`} for more info. @see WasmParserOptions */\r\ntype WasmParserOptions = Parameters<WabtParserFunc>[2];\r\n\r\n/** See @see {@link https://github.com/AssemblyScript/wabt.js/blob/main/README.md|`wabt.ToBinaryOptions`} for more info. @see WasmGeneratorOptions */\r\ntype WasmGeneratorOptions = Parameters<ReturnType<WabtParserFunc>[\"toBinary\"]>[0];\r\n\r\n/** The configuration settings for `vite-plugin-wat2wasm`. @see Wat2WasmOptions */\r\ninterface Wat2WasmOptions {\r\n /** Configures `.wasm` features you wish to enable for `vite-plugin-wat2wasm`. @default {} @see {@link WasmParserOptions|`WasmParserOptions`} */\r\n parser?: WasmParserOptions;\r\n\r\n /** Configures how `vite-plugin-wat2wasm` to generate `.wasm` files. @default {} @see {@link WasmGeneratorOptions|`WasmGeneratorOptions`} */\r\n generator?: WasmGeneratorOptions;\r\n}\r\n\r\n/** Enables compilation of `.wat` files and generation of `.wasm`, with modifiable settings.\r\n *\r\n * @param options - the configuration options for `vite-plugin-wat2wasm`. @see {@link Wat2WasmOptions|`Wat2WasmOptions`}\r\n * @returns a Vite plugin object that allows for compilation of `.wat` files. @see {@link https://vite.dev/guide/api-plugin|`Plugin`}\r\n */\r\nconst wat2WasmPlugin = (options: Wat2WasmOptions = {}): Plugin => {\r\n const {\r\n parser: parserOptions = {},\r\n generator: generatorOptions = {},\r\n } = options;\r\n\r\n return {\r\n name: \"wat2wasm\",\r\n\r\n transform(code: string, id: string) {\r\n if (!id.endsWith(\".wat\")) return null;\r\n\r\n const module = wabt.parseWat(id, code, parserOptions);\r\n\r\n const wasmWrapper = module.toBinary(generatorOptions);\r\n if (generatorOptions.log) console.log(id + \"\\n\" + \"\\n\", wasmWrapper.log);\r\n\r\n const bfr = wasmWrapper.buffer;\r\n\r\n return `export default async (imports = {}) => WebAssembly.instantiate(Uint8Array.from(atob(\"${btoa(String.fromCharCode(...bfr))}\"), (char) => char.charCodeAt(0)), imports).then(({ instance: { exports } }) => exports);`;\r\n }\r\n };\r\n};\r\n\r\nexport default wat2WasmPlugin;\r\nexport type { Wat2WasmOptions, WasmParserOptions, WasmGeneratorOptions };\r\n"],"mappings":"oBAGA,MAAM,EAAO,MAAM,GAAU,CAgD7B,IAAA,GAxBwB,EAA2B,EAAE,GAAa,CAC9D,GAAM,CACF,OAAQ,EAAgB,EAAE,CAC1B,UAAW,EAAmB,EAAE,EAChC,EAEJ,MAAO,CACH,KAAM,WAEN,UAAU,EAAc,EAAY,CAChC,GAAI,CAAC,EAAG,SAAS,OAAO,CAAE,OAAO,KAIjC,IAAM,EAFS,EAAK,SAAS,EAAI,EAAM,EAAc,CAE1B,SAAS,EAAiB,CACjD,EAAiB,KAAK,QAAQ,IAAI,EAAK;;EAAa,EAAY,IAAI,CAExE,IAAM,EAAM,EAAY,OAExB,MAAO,wFAAwF,KAAK,OAAO,aAAa,GAAG,EAAI,CAAC,CAAC,4FAExI"}
1
+ {"version":3,"file":"index.js","names":["root: string","rootDist: string","isServing: boolean","filesToEmit: Record<string, Uint8Array>","fetchWasmEmit: boolean","fetchWasmFunc: string"],"sources":["../src/index.ts"],"sourcesContent":["import fs from \"fs/promises\";\r\nimport path from \"path\";\r\n\r\nimport crypto from \"crypto\";\r\n\r\nimport type { Plugin } from \"vite\";\r\nimport initWabt from \"wabt\";\r\n\r\nconst wabt = await initWabt();\r\n\r\ntype WabtParserFunc = Awaited<ReturnType<typeof initWabt>>[\"parseWat\"];\r\n\r\n/** See @see {@link https://github.com/AssemblyScript/wabt.js/blob/main/README.md|`wabt.WasmFeatures`} for more info. @see WasmParserOptions */\r\ntype WasmParserOptions = Parameters<WabtParserFunc>[2];\r\n\r\n/** See @see {@link https://github.com/AssemblyScript/wabt.js/blob/main/README.md|`wabt.ToBinaryOptions`} for more info. @see WasmGeneratorOptions */\r\ntype WasmGeneratorOptions = Parameters<ReturnType<WabtParserFunc>[\"toBinary\"]>[0];\r\n\r\n/** The configuration settings for `vite-plugin-wat2wasm`. @see Wat2WasmOptions */\r\ninterface Wat2WasmOptions {\r\n /** Whether to inline generated WebAssembly output within JavaScript files when transforming `.wat` files. */\r\n inlineAssemblies?: boolean;\r\n\r\n /** Configures WebAssembly features you wish to enable for `vite-plugin-wat2wasm`. @default {} @see {@link WasmParserOptions|`WasmParserOptions`} */\r\n parser?: WasmParserOptions;\r\n\r\n /** Configures how `vite-plugin-wat2wasm` to generate WebAssembly output. @default {} @see {@link WasmGeneratorOptions|`WasmGeneratorOptions`} */\r\n generator?: WasmGeneratorOptions;\r\n\r\n /** Determines the runtimes that can be targeted when the WebAssembly modules are fetched. Does not affect anything if `inlineAssemblies` is set to `true`. */\r\n fetchTargets?: FetchTarget | FetchTarget[];\r\n\r\n /** The directory path where utility functions used by JavaScript files to retrieve and interact with WebAssembly modules will be stored. */\r\n utilDirPath?: string;\r\n}\r\n\r\ntype FetchTarget = \"browser\" | \"node\";\r\n\r\n/** Enables compilation of `.wat` files and generation of WebAssembly, with modifiable settings.\r\n *\r\n * @param options - the configuration options for `vite-plugin-wat2wasm`. @see {@link Wat2WasmOptions|`Wat2WasmOptions`}\r\n * @returns a Vite plugin object that allows for compilation of `.wat` files. @see {@link https://vite.dev/guide/api-plugin|`Plugin`}\r\n */\r\nconst wat2WasmPlugin = (options: Wat2WasmOptions = {}): Plugin => {\r\n const {\r\n inlineAssemblies = false,\r\n\r\n parser: parserOptions = {},\r\n generator: generatorOptions = {},\r\n\r\n fetchTargets = [\"browser\", \"node\"],\r\n utilDirPath = \"./__wasm-utils\"\r\n } = options;\r\n\r\n const PLUGIN_ID: string = \"wat2wasm\";\r\n const FETCH_WASM_ID = PLUGIN_ID + \":\" + crypto.randomBytes(4).toString(\"hex\");\r\n\r\n const FETCH_WASM_PATH = path.join(utilDirPath, \"fetchWasm.js\");\r\n\r\n let root: string;\r\n let rootDist: string;\r\n\r\n let isServing: boolean;\r\n\r\n const targetsBrowser = fetchTargets.includes(\"browser\");\r\n const targetsNode = fetchTargets.includes(\"node\" );\r\n\r\n const filesToEmit: Record<string, Uint8Array> = {};\r\n\r\n let fetchWasmEmit: boolean = false;\r\n const fetchWasmFunc: string =\r\n `export async function fetchWasm(filename, parentPath, imports) {` + \"\\n\" +\r\n (targetsBrowser ? ` if (typeof window !== \"undefined\" && typeof document !== \"undefined\") return WebAssembly.instantiateStreaming(fetch(new URL(filename, parentPath)), imports);` : \"\") + \"\\n\" +\r\n (targetsNode ? ` if (typeof process !== \"undefined\" && \"versions\" in process && \"node\" in process.versions) return WebAssembly.instantiate(await (await import(\"fs/promises\").then(({ readFile }) => readFile))(filename), imports);` : \"\") + \"\\n\" +\r\n \"\\n\" +\r\n ` throw new Error(\"The runtime used to import this WebAssembly module is not supported. If this is a mistake, adjust your fetchTargets to fit the specific runtime.\");` + \"\\n\" +\r\n `}` + \"\\n\";\r\n\r\n const transformWasm = (bfr: Uint8Array, filename: string) => inlineAssemblies || isServing\r\n ?\r\n `\r\n export default async (imports = {}) => {\r\n const data = atob(\"${btoa(String.fromCharCode(...bfr))}\");\r\n\r\n const len = data.length;\r\n\r\n const bfr = new Uint8Array(len);\r\n for (let i = 0; i < len; i++) bfr[i] = data.charCodeAt(i);\r\n\r\n return WebAssembly.instantiate(bfr).then((src) => src.instance.exports);\r\n };\r\n `\r\n :\r\n `\r\n import { fetchWasm } from \"${FETCH_WASM_ID}\";\r\n export default (imports = {}) => fetchWasm(\"${filename}\", import.meta.url, imports).then((src) => src.instance.exports);\r\n `;\r\n\r\n return {\r\n name: \"wat2wasm\",\r\n enforce: \"pre\",\r\n\r\n transform(code: string, pathId: string) {\r\n if (!pathId.endsWith(\".wat\")) return null;\r\n\r\n pathId = pathId.replaceAll(\"\\\\\", \"/\");\r\n\r\n const pathRel = path.relative(root, pathId);\r\n const basename = path.basename(pathId, \".wat\");\r\n\r\n const module = wabt.parseWat(basename + \".wat\", code, parserOptions);\r\n\r\n const output = module.toBinary(generatorOptions);\r\n if (generatorOptions.log) console.log(\"\\x1b[1;35m[plugin-wat2wasm]\\x1b[0;39m \\x1b[36mLog Output\\x1b[39m - \\x1b[92m\" + pathRel + \"\\n\" + \"\\x1b[39m\" + output.log);\r\n\r\n const bfr = output.buffer;\r\n\r\n filesToEmit[pathId] = bfr;\r\n\r\n return transformWasm(bfr, basename + \".wasm\");\r\n },\r\n\r\n generateBundle(_options, bundles) {\r\n if (inlineAssemblies) return;\r\n\r\n for (let [pathBundle, bundle] of Object.entries(bundles)) {\r\n if (bundle.type === \"asset\") continue;\r\n\r\n pathBundle = pathBundle.replaceAll(\"\\\\\", \"/\");\r\n\r\n const pathParent = path.join(pathBundle, \"../\");\r\n\r\n const modules = bundle.moduleIds;\r\n for (let pathModule of modules) {\r\n pathModule = pathModule.replaceAll(\"\\\\\", \"/\");\r\n if (!(pathModule in filesToEmit)) continue;\r\n\r\n const filename = path.basename(pathModule, \".wat\") + \".wasm\";\r\n const pathEmittedFile = path.join(pathParent, filename);\r\n\r\n const bfr = filesToEmit[pathModule]!;\r\n\r\n this.emitFile({\r\n type: \"asset\",\r\n\r\n source: bfr,\r\n fileName: pathEmittedFile\r\n });\r\n }\r\n\r\n bundle.code = bundle.code.replaceAll(FETCH_WASM_ID, path.relative(pathParent, FETCH_WASM_PATH).replaceAll(\"\\\\\", \"/\"));\r\n }\r\n },\r\n\r\n buildStart() {\r\n if (\"data\" in this) {\r\n const data = this.data as any;\r\n\r\n root = (data.outputOptions.preserveModules ? data.outputOptions.preserveModulesRoot : path.join(data.outputOptions.dir, \"../\")).replaceAll(\"\\\\\", \"/\");\r\n rootDist = data.outputOptions.dir.replaceAll(\"\\\\\", \"/\");\r\n\r\n isServing = false;\r\n }\r\n\r\n fetchWasmEmit = !(inlineAssemblies || isServing);\r\n },\r\n\r\n async closeBundle() {\r\n if (fetchWasmEmit) {\r\n const fetchWasmPath = path.join(rootDist, FETCH_WASM_PATH).replaceAll(\"\\\\\", \"/\");\r\n const fetchWasmParent = path.join(fetchWasmPath, \"../\").replaceAll(\"\\\\\", \"/\");\r\n\r\n await fs.mkdir(fetchWasmParent, { recursive: true });\r\n await fs.writeFile(fetchWasmPath, fetchWasmFunc, \"utf-8\");\r\n }\r\n },\r\n\r\n configResolved(config) {\r\n root = config.root.replaceAll(\"\\\\\", \"/\");\r\n rootDist = path.join(root, config.build.outDir).replaceAll(\"\\\\\", \"/\");\r\n\r\n isServing = config.command === \"serve\";\r\n }\r\n };\r\n};\r\n\r\nexport default wat2WasmPlugin;\r\nexport type { Wat2WasmOptions, WasmParserOptions, WasmGeneratorOptions, FetchTarget };\r\n"],"mappings":"yFAQA,MAAM,EAAO,MAAM,GAAU,CAkL7B,IAAA,GA/IwB,EAA2B,EAAE,GAAa,CAC9D,GAAM,CACF,mBAAmB,GAEnB,OAAQ,EAAgB,EAAE,CAC1B,UAAW,EAAmB,EAAE,CAEhC,eAAe,CAAC,UAAW,OAAO,CAClC,cAAc,kBACd,EAGE,EAAkB,YAAkB,EAAO,YAAY,EAAE,CAAC,SAAS,MAAM,CAEzE,EAAkB,EAAK,KAAK,EAAa,eAAe,CAE1DA,EACAC,EAEAC,EAEE,EAAiB,EAAa,SAAS,UAAU,CACjD,EAAiB,EAAa,SAAS,OAAU,CAEjDC,EAA0C,EAAE,CAE9CC,EAAyB,GACvBC,EACF;GACC,EAAiB,oKAAsK,IAAM;GAC7L,EAAiB,0NAA4N,IAAM;;;;EAKlP,GAAiB,EAAiB,IAAqB,GAAoB,EAE7E;;iCAEyB,KAAK,OAAO,aAAa,GAAG,EAAI,CAAC,CAAC;;;;;;;;;UAW3D;qCAC6B,EAAc;sDACG,EAAS;UAG3D,MAAO,CACH,KAAM,WACN,QAAS,MAET,UAAU,EAAc,EAAgB,CACpC,GAAI,CAAC,EAAO,SAAS,OAAO,CAAE,OAAO,KAErC,EAAS,EAAO,WAAW,KAAM,IAAI,CAErC,IAAM,EAAU,EAAK,SAAS,EAAM,EAAO,CACrC,EAAW,EAAK,SAAS,EAAQ,OAAO,CAIxC,EAFS,EAAK,SAAS,EAAW,OAAQ,EAAM,EAAc,CAE9C,SAAS,EAAiB,CAC5C,EAAiB,KAAK,QAAQ,IAAI,8EAAgF,EAAU;UAAoB,EAAO,IAAI,CAE/J,IAAM,EAAM,EAAO,OAInB,MAFA,GAAY,GAAU,EAEf,EAAc,EAAK,EAAW,QAAQ,EAGjD,eAAe,EAAU,EAAS,CAC1B,MAEJ,IAAK,GAAI,CAAC,EAAY,KAAW,OAAO,QAAQ,EAAQ,CAAE,CACtD,GAAI,EAAO,OAAS,QAAS,SAE7B,EAAa,EAAW,WAAW,KAAM,IAAI,CAE7C,IAAM,EAAa,EAAK,KAAK,EAAY,MAAM,CAEzC,EAAU,EAAO,UACvB,IAAK,IAAI,KAAc,EAAS,CAE5B,GADA,EAAa,EAAW,WAAW,KAAM,IAAI,CACzC,EAAE,KAAc,GAAc,SAElC,IAAM,EAAW,EAAK,SAAS,EAAY,OAAO,CAAG,QAC/C,EAAkB,EAAK,KAAK,EAAY,EAAS,CAEjD,EAAM,EAAY,GAExB,KAAK,SAAS,CACV,KAAM,QAEN,OAAQ,EACR,SAAU,EACb,CAAC,CAGN,EAAO,KAAO,EAAO,KAAK,WAAW,EAAe,EAAK,SAAS,EAAY,EAAgB,CAAC,WAAW,KAAM,IAAI,CAAC,GAI7H,YAAa,CACT,GAAI,SAAU,KAAM,CAChB,IAAM,EAAO,KAAK,KAElB,GAAQ,EAAK,cAAc,gBAAkB,EAAK,cAAc,oBAAsB,EAAK,KAAK,EAAK,cAAc,IAAK,MAAM,EAAE,WAAW,KAAM,IAAI,CACrJ,EAAW,EAAK,cAAc,IAAI,WAAW,KAAM,IAAI,CAEvD,EAAY,GAGhB,EAAgB,EAAE,GAAoB,IAG1C,MAAM,aAAc,CAChB,GAAI,EAAe,CACf,IAAM,EAAgB,EAAK,KAAK,EAAU,EAAgB,CAAC,WAAW,KAAM,IAAI,CAC1E,EAAkB,EAAK,KAAK,EAAe,MAAM,CAAC,WAAW,KAAM,IAAI,CAE7E,MAAM,EAAG,MAAM,EAAiB,CAAE,UAAW,GAAM,CAAC,CACpD,MAAM,EAAG,UAAU,EAAe,EAAe,QAAQ,GAIjE,eAAe,EAAQ,CACnB,EAAO,EAAO,KAAK,WAAW,KAAM,IAAI,CACxC,EAAW,EAAK,KAAK,EAAM,EAAO,MAAM,OAAO,CAAC,WAAW,KAAM,IAAI,CAErE,EAAY,EAAO,UAAY,SAEtC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-wat2wasm",
3
- "version": "2.0.0",
3
+ "version": "2.1.1",
4
4
  "description": "A simple Vite plugin that enables `.wat` (WebAssembly Text Format) compilation and allows usage of WebAssembly within your codebase/library",
5
5
 
6
6
  "homepage": "https://github.com/osoclos/vite-plugin-wat2wasm",