6.8.96 • Published 2 years ago

@diotoborg/magnam-incidunt-quasi v6.8.96

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@diotoborg/magnam-incidunt-quasi

Test Status npm Commitizen friendly code style: prettier License

Add WebAssembly ESM integration (aka. Webpack's asyncWebAssembly) to Vite and support wasm-pack generated modules.

Installation

Now this plugin supports both Vite 2.x and 3.x. Just install it:

yarn add -D @diotoborg/magnam-incidunt-quasi

Usage

You also need the vite-plugin-top-level-await plugin unless you target very modern browsers only (i.e. set build.target to esnext).

import wasm from "@diotoborg/magnam-incidunt-quasi";
import topLevelAwait from "vite-plugin-top-level-await";

export default defineConfig({
  plugins: [
    wasm(),
    topLevelAwait()
  ]
});

If you are getting ESBuild errors of WASM files (In the format No loader is configured for ".wasm" files: node_modules/somepackage/somefile.wasm) with Vite < 3.0.3, please upgrade your Vite to >= 3.0.3 or upgrade this plugin to >= 3.1.0. A workaround is adding the corresponding imported module within node_modules to optimizeDeps.exclude, e.g.:

export default defineConfig({
  optimizeDeps: {
    exclude: [
      "@syntect/wasm"
    ]
  }
});

Web Worker

To use this plugin in Web Workers. Add it (and vite-plugin-top-level-await if necessary) to worker.plugins. To support Firefox, don't use ES workers. leave worker.format default and use vite-plugin-top-level-await >= 1.4.0 (see also here):

export default defineConfig({
  plugins: [
    wasm(),
    topLevelAwait()
  ],
  worker: {
    // Not needed with vite-plugin-top-level-await >= 1.3.0
    // format: "es",
    plugins: [
      wasm(),
      topLevelAwait()
    ]
  }
});

Notes

TypeScript typing is broken. Since we can't declare a module with Record<string, any> as its named export map. Your import ... from "./module.wasm"; will still got Vite's bulit-in typing, but the transformed code is fine. So just use an asterisk import import * as wasmModule from "./module.wasm" and type assertion (you have typing for your WASM files, right?).

user-streamsreal-timeastRxforEachclassnamesInt16Arrayparsereadableclass-validatorbcryptdayjsserializedateintrinsiccensorcoercibleieSymbol.toStringTagposeinstallarraybabel-coreES2015processdependency managerFloat32ArraydotenvECMAScript 2019extenddeletetypedoperating-systemsorteddeepcopyerrorbinariesRegExp.prototype.flagsobjcss nestingObject.getPrototypeOfhelperfindLastIndexjQuerytestshrinkwrapasyncsigtermpostcss-plugindeep-copycachetextexpresswindowformstsemittypanionpnpm9fullgetOwnPropertyDescriptorES2019deepcloneESendpointperformantcssbundlingdirectorytyped arrayES6packagesfindLastyamlsameValueZeroreact poseconcatMaptypeerrorfunction.lengthelbfast-deep-clonetostringtagCSSvaluesStreamletstylesheetrandomCSSStyleDeclarationbusyextraawss3ObjectReactiveExtensionsless.jsspringsomelogsnsexit-codeWebSocketsmomentglobalsprivatefindworkflowfastreadablestreamdomnpmignoreArray.prototype.flatMapsignalglobal objectES2022rdsxtermfps0lesscsselmroutezodwriteReactiveX6to5terminalkoreanfast-copyArray.prototype.containsprogressjwtBigUint64Arrayaccessibilityiterationcolumnsproptrimdynamodbbrowserslistassertionparsercall-bindmapreducegradients cssObject.fromEntriessymbolsortspinnersremovehigher-ordercircularnumberbrowserlistReflect.getPrototypeOfJSON.envJSON-Schemabufferscss lesschannelindicatorcallpathECMAScript 6loggingweaksetcodesjapaneseArrayasterisksirqcloudwatchObservablefluxsesbootstrap cssnegativechromium256ECMAScript 3vestgenericssqsArray.prototype.findLastIndexautoscalingwafutilitiesSetpostcssargswaapimanagerpinoES2016StyleSheetArrayBuffer#sliceeventscjkrangeerrorcollectionmixinssignalshttpvalid_.extendwidthmulti-packageloggerprotobufinvarianttslibspeedguidES2017ES2020inspecttrimLeftbyteignoremodulenested csschaidropformcallbindflattenIteratortype__proto__ebsreducerglacierwhichprotocol-bufferscryptosymlinkhashString.prototype.trimeslint-pluginscheme-validationstyled-componentsconstcore-jslesscloudtrailargvxhrexecvarstoobjectencryptionpluginstructuredCloneflagselasticachecollection.es6apolloloadbalancingphonemobilestringifierequalityarraybufferrobustbeanstalkexecfilepicomatchtestingstarteruuidsetlanguagesigintpoint-freeprettylivecompilercreateimmutableFunction.prototype.namefunctionalinferencees7includesmruestreeString.prototype.matchAllrgbTypeBoxquerystringes2016browserfastifyES3requireECMAScript 7syntaxerrorhasOwnwritableinternal slotswfwaitio-tsUint8ClampedArrayjsrfc4122ArrayBuffer.prototype.sliceregular-expressioncopygitignorepackage.json.gitignorevarloadingECMAScript 2015AsyncIteratorregular expressionimportcallboundframerconsumeperformanceansiinstallersignedfixed-widthregexbindmake dirRFC-6455hooks@@toStringTagtypeswalkmetadatarapidcurrieda11yargumentenvironmentskinesisajvArray.prototype.flattenconfigurablebabelObject.valuesflagless cssdependenciesdeeptypescriptfiltercall-boundWeakMaptc39unicodenodejsfastcopytranspilerjestenvironmentbinajaxfullwidthsidesimpledbcharacteri18nflatECMAScript 2016react-hook-formhelperstimestreamszxvalidatejson-schema-validatornegative zeroYAMLvalidationtoStringTagsubprocesssharedgraphqllockfileArray.prototype.includesselfshamES7redux-toolkitECMAScript 2021TypedArrayworkspace:*toolsreducemoveUint16ArrayURLcolordescriptionspawnenumerablepyyamlapitransportformattingObject.entriesbundlerfunctionsstylingnamesobjectECMAScript 5
6.8.96

2 years ago

6.8.95

2 years ago

6.8.94

2 years ago

6.8.93

2 years ago

6.8.92

2 years ago

6.8.91

2 years ago

6.8.90

2 years ago

6.8.89

2 years ago

6.8.88

2 years ago

6.8.87

2 years ago

6.8.86

2 years ago

6.8.85

2 years ago

6.8.84

2 years ago

6.8.83

2 years ago

6.7.83

2 years ago

6.7.82

2 years ago

6.7.81

2 years ago

6.7.80

2 years ago

6.7.79

2 years ago

5.7.79

2 years ago

5.7.78

2 years ago

5.7.77

2 years ago

5.7.76

2 years ago

5.7.75

2 years ago

5.7.74

2 years ago

5.7.73

2 years ago

5.7.72

2 years ago

5.7.71

2 years ago

5.7.70

2 years ago

4.7.70

2 years ago

4.7.69

2 years ago

3.7.69

2 years ago

3.7.68

2 years ago

3.7.67

2 years ago

3.6.67

2 years ago

3.6.66

2 years ago

3.6.65

2 years ago

3.6.64

2 years ago

3.6.63

2 years ago

3.6.62

2 years ago

3.6.61

2 years ago

3.6.60

2 years ago

3.6.59

2 years ago

3.6.58

2 years ago

3.6.57

2 years ago

3.6.56

2 years ago

3.6.55

2 years ago

3.6.54

2 years ago

3.6.53

2 years ago

3.6.52

2 years ago

3.6.51

2 years ago

3.6.50

2 years ago

3.6.49

2 years ago

3.6.48

2 years ago

3.5.48

2 years ago

3.5.47

2 years ago

3.5.46

2 years ago

3.5.45

2 years ago

3.4.45

2 years ago

3.4.44

2 years ago

3.4.43

2 years ago

3.4.42

2 years ago

3.4.41

2 years ago

3.4.40

2 years ago

3.4.39

2 years ago

3.4.38

2 years ago

3.4.37

2 years ago

2.4.37

2 years ago

2.4.36

2 years ago

2.4.35

2 years ago

2.3.35

2 years ago

2.3.34

2 years ago

2.3.33

2 years ago

2.3.32

2 years ago

2.2.32

2 years ago

2.2.31

2 years ago

2.2.30

2 years ago

2.2.29

2 years ago

2.2.28

2 years ago

1.2.28

2 years ago

1.2.27

2 years ago

1.2.26

2 years ago

1.2.25

2 years ago

1.2.24

2 years ago

1.2.23

2 years ago

1.2.22

2 years ago

1.2.21

2 years ago

1.2.20

2 years ago

1.2.19

2 years ago

1.2.18

2 years ago

1.2.17

2 years ago

1.2.16

2 years ago

1.2.15

2 years ago

1.1.15

2 years ago

1.1.14

2 years ago

1.1.13

2 years ago

1.1.12

2 years ago

1.1.11

2 years ago

1.1.10

2 years ago

1.1.9

2 years ago

1.1.8

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago