patriceckhart / NeosRulez.DynamicResources

A package for Neos CMS which render and cache dynamic CSS (scss) and Javascript resources.
0 stars 2 forks source link

asset generation only in production mode? #1

Closed mhsdesign closed 3 years ago

mhsdesign commented 3 years ago

I tried out your great boilerplate: https://github.com/patriceckhart/NeosCMS-Boilerplate

but the assets (css/js) are only created when using production mode

FLOW_CONTEXT=Production ./flow server:run

a simple ./flow server:run or FLOW_CONTEXT=Development./flow server:run would lead to this error on the asset url:

Notice: Undefined index: FLOW_CONTEXT in /NeosCMS-Boilerplate/Data/Temporary/Development/Cache/Code/Flow_Object_Classes/NeosRulez_DynamicResources_Controller_ResourceController.php line 57

Is this wanted behavior? If so, I would make a pullrequest and add this info to the Readme for the NeosCMS-Boilerplate ;)

patriceckhart commented 3 years ago

I've never used ./flow server:run. Environment variable FLOW_CONTEXT isn't set?

It is not wanted. The resources must always be generated. They are just not cached in Development mode.

But to avoid this I will add a condition. Then it will work.

patriceckhart commented 3 years ago

fixed in 1.0.3

mhsdesign commented 3 years ago

Yeah it works now ;) Thanks ^^