preact-compat
preact-compat copied to clipboard
Added a rollup config section to the readme
https://github.com/developit/preact-compat/issues/397
Probably needs to be trimmed down, included everything needed to run the example below the configs.
I also referenced the es file instead of the umd one. I figured if you're using rollup, you probably want to prefer es when available.
If it were to be trimmed down to match browserify and webpack, I guess it would only need the alias sections, but I don't know how obvious it would be to add the rest of the plugins to get the example running (which this does).
It might be worth dropping all these how-to sections into <details> so they are collapsed by default?
<details>
<summary>Summary Goes Here</summary>
...this is hidden, collapsable content...
</details>
Hmm this doesn't work for me. I get
Could not resolve '../Engine/node_modules/preact-compat/dist/preact-compat.es.js' from commonjs-proxy:../Engine/node_modules/preact-compat/dist/preact-compat.es.js ... tried switching up the order and stuff but doesnt seem to help
@cl4ws0n oh, those would probably need a path.resolve(__dirname, "node_modules", etc), looks like you're running out of a subdirectory or something. Sorry I dropped the ball on this, will try to get back and make a working stripped down version at some point.
Trimmed out everything but the alias plugin, and added path.resolve since it seems the string literal doesn't always work. I did not add the <details> sections, since it's a little out of scope and would probably fit better int a separate pull request, same with the preact-compat/aliases export.
Do you want to wait on this one until we get /aliases in?
Works for me, I'll try to remember to reference this issue in the pull request so it's easy to see when this can be updated.
This might not be the right place to ask, but it would be nice to know the full setup for preact + babel + eslint + rollup
I opened #458 for the preact-compat/aliases entry.