Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions programming/javascript/user-guide/mrz-scanner-v2.2.3000.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,9 @@ npm i [email protected] -E

The resources are located at the path node_modules/<pkg>, without @<version>, so the script in your page would be like:

```html
<script src="node_modules/dynamsoft-capture-vision-bundle/dist/dcv.bundle.js"></script>
```

Since @<version> is missing, you need to specify the location of the "engine" files:

Expand Down
9 changes: 6 additions & 3 deletions programming/javascript/user-guide/mrz-scanner.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,14 @@ npm i [email protected] -E
npm i [email protected] -E
```

The resources are located at the path node_modules/<pkg>, without @<version>, so the script in your page would be like:
The resources are located at the path `node_modules/<pkg>`, without `@<version>`. You must copy "dynamsoft-xxx" packages elsewhere and add `@<version>`. The `<version>` can be obtained from `package.json` of each package. You can typically include SDK like this:

<script src="node_modules/dynamsoft-capture-vision-bundle/dist/dcv.bundle.js"></script>
```html
<script src="path/to/dynamsoft-capture-vision-bundle/dist/dcv.bundle.js"></script>
```

Since @<version> is missing, you need to specify the location of the "engine" files:
Another thing to do is to specify the `engineResourcePaths` so that the SDK can correctly locate the resources.
> Since "node_modules" is reserved for Node.js dependencies, and in our case the package is used only as static resources, we recommend either renaming the "node_modules" folder or moving the "dynamsoft-" packages to a dedicated folder for static resources in your project to facilitate self-hosting.

```javascript
//The following code uses the jsDelivr CDN as an example, feel free to change it to your own location of these files
Expand Down