Installation of the specific module type
By default, PyScript-React uses UMD version of code. In this package we can access different module types. For example, if we would like to use ESM, we can add to import a post-fix after the library name.
Example:
import PyScript from "pyscript-react/esm"; // main entrypoint
import PyScriptProvider from "pyscript-react/esm/components/py-script-provider"; // specific component
Also, we can just download package with only specific module type. List of possible to download packages is relative to that which are embedded into main package.
Packages: [UMD, ESM, AMD, CJS, SYSTEM, CJS2, CJS-ESM]
Via npm:
npm i pyscript-react-(umd|esm|amd|cjs|system|cjs2|cjs-esm)
Via yarn:
yarn add pyscript-react-(umd|esm|amd|cjs|system|cjs2|cjs-esm)
Via pnpm:
pnpm i pyscript-react-(umd|esm|amd|cjs|system|cjs2|cjs-esm)