How to overrun template maximum file size of 256kB?

EvgeniyOrlov
New Member
5 0 0

I try to inline javascript but run into the 256 kB limit of the theme.liquid template.

Is it possible to overrun this limit? How?

Replies 3 (3)
oreoorbitz
Shopify Partner
213 27 123

You can't.
I have a client where the css is inlined, to handle this I setup a build process to split the file in half into two seperate snippets.

You could take this same approach with JS, however, it's possible the JS will break if you just split it right in half, so you will have to be careful.

 

Available for freelance. I specialize in speed improvement and theme development.
https://www.upwork.com/fl/orionholmes

If your looking for a pagespeed solution for your Website, take a look at: https://renderbetter.com/
EvgeniyOrlov
New Member
5 0 0

could you post some documentation where I can read more about this limit? 

oreoorbitz
Shopify Partner
213 27 123

There isn't any official shopify documentation I could find.

Available for freelance. I specialize in speed improvement and theme development.
https://www.upwork.com/fl/orionholmes

If your looking for a pagespeed solution for your Website, take a look at: https://renderbetter.com/