Closed kontrollanten closed 5 years ago
Not sure I want to load it with all possible features. More feature more ways to fail. I created removeScriptTags
for fun and most likely I will drop it in v2. But you still can fork it and use your fork, because module installable from git url
Sure, I understand! I'll do a fork for it 👍
If anyone is interested, you can use my fork at https://github.com/kontrollanten/react-snap/pull/1
yarn add -D git://github.com/kontrollanten/react-snap#remove_some_scripts
package.json
: "reactSnap": {
"removeScriptTags": [
".selector-to-remove"
],
},
Not sure I want to load it with all possible features. More feature more ways to fail. I created
removeScriptTags
for fun and most likely I will drop it in v2. But you still can fork it and use your fork, because module installable from git url
Please don't drop it, it's nice to be able to put react-snap
in packages.json
and get static pages out without having to edit anything else 🙂
Thanks for a really great module! It's very easy to get started.
I'm having a scenario where I don't want React to be included on client side (like this https://twitter.com/NetflixUIE/status/923374215041912833) and found the option
removeScriptTags
. The problem is that I want to keep some script tags (for tracking, etc). I think that may be a common scenario.A suggested solution would be that
removeScriptTags
can either receive a bool (like today) or an array containing strings with CSS selectors.The following config
Will run
I'd be happy to create a PR for this. Any thoughts?