Skip to content

Commit 1adc243

Browse files
authored
Merge pull request #51 from dynamsoft-docs/preview
update to internal commit 49a38afa
2 parents 7c39156 + 5ac3382 commit 1adc243

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

programming/javascript/user-guide/mrz-scanner-v2.2.3000.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,9 @@ npm i [email protected] -E
217217

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

220+
```html
220221
<script src="node_modules/dynamsoft-capture-vision-bundle/dist/dcv.bundle.js"></script>
222+
```
221223

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

programming/javascript/user-guide/mrz-scanner.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,11 +251,14 @@ npm i [email protected] -E
251251
252252
```
253253

254-
The resources are located at the path node_modules/<pkg>, without @<version>, so the script in your page would be like:
254+
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:
255255

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

258-
Since @<version> is missing, you need to specify the location of the "engine" files:
260+
Another thing to do is to specify the `engineResourcePaths` so that the SDK can correctly locate the resources.
261+
> 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.
259262
260263
```javascript
261264
//The following code uses the jsDelivr CDN as an example, feel free to change it to your own location of these files

0 commit comments

Comments
 (0)