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
244 29 129

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



You can also contact me directly if you prefer.
EvgeniyOrlov
New Member
5 0 0

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

oreoorbitz
Shopify Partner
244 29 129

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



You can also contact me directly if you prefer.