0

I dont know how to put ResourcesPath correctly. Or there is another issue.

I get this error :

Refused to apply style from 'http://localhost/Resources/src/dynamsoft.webtwain.css?t=20230105181423' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

Stev24
  • 3
  • 3

1 Answers1

0

You can copy the resources in node_modules to the public folder and then set the resources path.

  1. Update pacakge.json to use ncp to copy the resources before build or dev.

    "build": "ncp node_modules/dwt/dist public/assets/dwt-resources && build",
    "dev": "ncp node_modules/dwt/dist public/assets/dwt-resources && dev",
    
  2. Set the resources path:

    Dynamsoft.DWT.ResourcesPath = 'assets/dwt-resources';
    

Related blog: How to Build a Document Scanning Desktop App with Quasar and Electron

Lihang Xu
  • 29
  • 2