-
-
Notifications
You must be signed in to change notification settings - Fork 148
Added a rollup config section to the readme #398
base: master
Are you sure you want to change the base?
Conversation
…mmed down, included everything needed to run the example below the configs
README.md
Outdated
resolve({ | ||
jsnext: true // preact | ||
}), | ||
alias({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated to this docs PR, but do you think it might be useful for preact-compat
to include an export that auto-generates this?
import alias from 'rollup-plugin-alias';
import aliases from 'preact-compat/aliases';
export default {
// ...
plugins: [
alias(aliases)
]
};
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, that's a cool idea. Although the function shorthand may confuse users that want to use more than just the preact aliases, since they would need to be a little more verbose and use destructuring with the regular object syntax.
Oh nevermind, they could just ...
the args going in, I should know not to comment before the caffeine kicks in. Seems good to me!
It might be worth dropping all these how-to sections into
|
README.md
Outdated
"create-react-class": "node_modules/preact-compat/lib/create-react-class.js" | ||
}), | ||
commonjs(), // prop-types | ||
replace({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it were to be trimmed down...
The replace
step seem unrelated to the intent of just using rollup + preact. As a newb, I'd prefer the smallest example that works. I'd prefer if this was trimmed
Hmm this doesn't work for me. I get |
@cl4ws0n oh, those would probably need a |
- Removed all plugins except alias - added path.resolve to aliases
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 |
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 |
#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).