Comments (4)
Thank you @shishkin for experimenting with this. If adding new formats doesn't help, there is no much I can help with.
Let's keep this issue open in case anyone else comes up with a solution.
from isomorphic-dompurify.
Hi @shishkin ,
Thank you for your suggestion. It makes sense.
The isomorhic-unfetch
uses microbundle for this purpose, like this:
// package.json
{
"build": "microbundle src/index.mjs -f cjs,esm,umd && microbundle polyfill/polyfill.mjs -o polyfill/index.js -f cjs --no-sourcemap"
}
However, I'm not sure if the package will work for Deno anyway because of the JSDom dependency which may not work for everywhere.
Anyway, would you like to help with this improvement?
from isomorphic-dompurify.
I gave it a try but ultimately wasn't able to figure out dynamic imports in the isomorphic ESM case.
After looking at isomorhic-unfetch
again, it seems it benefits from the unfetch
default export being an async function returning a Promise. That makes it easy to call a dynamic import and chain the promises for a result.
In case of DOMPurify, the default export is an object with functions. And I wasn't able to construct a static export from dynamic imports as I wasn't able to unwrap promises without top level await. And top level await seems only supported on specific targets, so won't cover default ESM case.
Please let me know if I have missed something.
from isomorphic-dompurify.
Related Issues (20)
- Question: How Isomorphic Works HOT 4
- Merge isomorphic-dompurify additions with dompurify? HOT 2
- Add information about the minimum node version HOT 2
- Request body is being removed HOT 3
- High CPU Utilisation by the library HOT 2
- _isomorphicDompurify.default.sanitize is not a function error in jest environment HOT 1
- target blank get added to every url HOT 1
- Build error when using isomorphic-dompurify in angular 15 universal HOT 8
- Requirements for Node.js 14 HOT 1
- Isomorphic Dompurify Remix support ? HOT 2
- Next.js build error: Window is not defined HOT 33
- String is being sanitized HOT 6
- Request for SemVer Adherence in Future Releases HOT 1
- Web Worker Support HOT 3
- usage import issue with vite named export 'sanitize' not found HOT 4
- use umijs ssr error HOT 4
- Can't resolve 'canvas' on next.js serverless app HOT 41
- dompurify.sanitize clears everything except for whats inside of <body> HOT 2
- Bumping to 0.16.0 - ReferenceError: TextEncoder is not defined HOT 24
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from isomorphic-dompurify.