-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide a way for done-ssr to use slim bundles #254
Comments
Doing a little research on this and want to lay out how this should work. User experienceThe user will have to create a slim build with stealTools.optimize({}, {
target: ["node", "web"]
}); Which will write out something like On the done-ssr side ideally there would not be any extra configuration needed to say that it is a slim build. Hopefully we could open up this file and see that it is a slim format (or conversely, steal format). Determining main bundle pathWhen done-ssr is run it will be passed a steal config object like: { main: 'donejs-chat/index.stache!done-autorender', ... } Based on the Internally steal.js is what determines that Ideally this logic could be extracted from steal.js and put into a commonjs module so that other tools (like done-ssr) could use it. Maybe something like normalizeMain(mainModuleName, [ bundlesPath ])_ var normalizeMain = require("steal-normalize-main-bundle");
normalizeMain("donejs-chat/index.stache!done-autorender");
// "dist/bundles/donejs-chat/index" Determining if a slim bundleOnce we know the path to the main bundle we can do an PluginsThe logic for done-ssr's steal integration is contained within the steal zone plugin: https://github.com/donejs/done-ssr/blob/master/zones/steal/index.js This plugin is a collection of other plugins. The following plugins are specific to steal.js and aren't relevant to the slim build:
The following plugins will need similar versions for slim:
TasksThe approach I would take to this project is:
|
I know we want the same thing to run in the client and on the server ... but how important is that compared to the difficulty of implementing this? Could we have slim on the client and fat build on the server for a while? |
We don't have to prioritize this issue, no. |
I’m not trying to argue one way or another really. Depends on how long you think this would take. |
done-ssr should be able to consume slim bundles just as it can regular steal bundles. This should hopefully be transparent to the user.
The text was updated successfully, but these errors were encountered: