-
Notifications
You must be signed in to change notification settings - Fork 27.6k
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
Static asset processing and optimization #867
Comments
Currently, we don't have a built in way to do it. Also the best way is to move all static content into a CDN. We track that here: #737 |
@arunoda might be an interesting feature though |
Hmm. Shouldn't it be as simple as adding a webpack loader?
…On Tue, Jan 24, 2017 at 18:45 Tim Neutkens ***@***.***> wrote:
@arunoda <https://github.com/arunoda> might be an interesting feature
though
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#867 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABth3wC4F1s5IMI_83Sm4KaBfvsy0i4Sks5rVeQ6gaJpZM4Lr-zY>
.
|
@ccorcos It's true if that's only a client side app. |
I'm confused, I figured next compiles all pages as different entry points
using webpack. Is webpack being used at runtime?
…On Wed, Jan 25, 2017 at 18:33 Arunoda Susiripala ***@***.***> wrote:
@ccorcos <https://github.com/ccorcos> It's if that's only a client side
app.
But since we do SSR stuff, we can't do everything in node which can be
done by Webpack.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#867 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABth34oEmigeL5oGCRxeApfXAOrUUbefks5rVzMlgaJpZM4Lr-zY>
.
|
Yes we do. That part is fine. But then we need to run those files on the server. Running that exactly on the server is impossible (and cost us with perf). So, we run it without webpack on the server for SSR. That's why we can't simply use everything webpack support. |
Ah, so on the server, you're just using babel plugins but in the browser, you're loading a bundle from webpack... That makes sense. Although what's wrong with running the webpack build on the server? You can set Node.js as a build target. Then we'd be able to create custom chunks and dynamically async load them inside |
@ccorcos Even it's Node.js target it takes time and compile time(CPU). We don't need that. |
Well you can compile only once before you deploy... |
@ccorcos What about dev time build and about dynamic pages. We need to work on that stuff too. |
You can leave out the image processing plugin
Well the pages are still built and split with webpack statically though right? |
I'm just failing to understand what exactly is the limitation here. |
It might make sense to open a new issue to discuss the topic of "universal webpack". Sounds like it would have the potential to fix several limitations and reduce code complexities coming from the differences between server and client side. |
any recommendations here? I usually use webpack with the image compression plugin, but it appears the standard approach is just to use file paths to the static directory. if I wanted to optimize my image assets, how do you recommend I do that without overwriting the full resolution images?
The text was updated successfully, but these errors were encountered: