marktext / muya

📄 Future markdown editor for web browser applications development
MIT License
636 stars 55 forks source link

The requested module '/node_modules/.vite/deps/dompurify.js?v=3e090982' does not provide an export named 'isValidAttribute' #70

Closed imp-oh closed 1 year ago

imp-oh commented 2 years ago

muya\lib\utils\dompurify.js Incompatible vite

import DOMPurify from 'dompurify'
const isValidAttribute = DOMPurify.isValidAttribute
const sanitize = DOMPurify.sanitize

export {
  isValidAttribute
}

export default sanitize
IronCode1024 commented 2 years ago

I have the same problem,Also used vite.

imp-oh commented 2 years ago

I have the same problem,Also used vite.

To use the https://github.com/marktext/marktext Modified into vue I am now directly using MarkText to modify it to vue2 There are too many problems with this version

Jocs commented 1 year ago

Now the project is not work with built, so vite may not be supported,PR is welcomed

Jocs commented 1 year ago

The project has already provided a built version. You can try installing the latest version.