Jonathan Lahijani Posted November 17, 2021 Share Posted November 17, 2021 I use Laravel Mix (webpack) as my build tool and the resulting files (js, css, fonts, images) get stored in /site/templates/dist/. My package.json is in /site/templates/. When using Laravel Mix with Tailwind 2 and its JIT compiler however, I hit a known infinite loop issue due to limitations with webpack:https://tailwindcss.com/docs/just-in-time-mode#styles-rebuild-in-an-infinite-loop To counteract this, I could put my dist folder inside /site/assets/. ProCache's built files go inside /site/assets/ as well in a 'pwpc' directory. Therefore my question is: Is it more 'proper' to put frontend built files in /site/assets/(subfolder-name)/ as opposed to /site/templates/(subfolder-name)/ ? Link to comment Share on other sites More sharing options...
horst Posted November 17, 2021 Share Posted November 17, 2021 As the name says: built assets ? Link to comment Share on other sites More sharing options...
bernhard Posted November 18, 2021 Share Posted November 18, 2021 From a conversation with ryan I think to remember that /site/assets is supposed to be writable while /site/templates is not. https://processwire.com/docs/start/structure/files/ does not state the latter one but it confirms my first point. 2 Link to comment Share on other sites More sharing options...
szabesz Posted November 19, 2021 Share Posted November 19, 2021 On 11/18/2021 at 2:51 PM, bernhard said: /site/assets is supposed to be writable while /site/templates is not It is a bit "hidden" but somewhat documented over here: https://processwire.com/docs/security/file-permissions/#securing-your-site-config.php-file Quote: "This includes /site/assets/ and everything within it, as well as /site/modules/ and everything in it (if you want to have a writable modules file system). Read the next section for details on how to do this." Also, the PW installer is also informative (sure, these are the conditions required by the installer, so later on /site/modules and config.php can be locked down, as also explained in the docs): Spoiler 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now