RomainMazB/octobercms-tailwindcss-boilerplate

Add Webpack Config fix to documentation or read out port from .env file

Closed this issue ยท 4 comments

This theme is my #2 helper next to builder-plugin. One thing I to figure out though, because documentation isnt't that clear about it:

  • when I ran my local mamp-install on a url like https://test-server:8890 I have to put https://test-server in the APP-URL in the .env file and the :8890 in webpack.config.js.

There I have to change proxy: process.env.APP_URL + ':80' to proxy: process.env.APP_URL + ':8890'

Otherwhise the browser-sync does not work because by default it listens to port :80

Hi @hubionmac, thanks to opened an issue for that.

For you, what should be the appropriate way to handle it?

Maybe an additional .env config variable such as APP_PORT?

If not present in the env file, it still should default to 80 in the webpack config file though ๐Ÿค”

Yes, why not...
proxy: process.env.APP_URL + ':' +(typeof process.env.APP_PORT == 'undefined'? '80' : process.env.APP_PORT)
maybe...

I'll fix this tomorrow night ๐Ÿ‘

@hubionmac done ๐Ÿ‘๐Ÿผ

With an additional commit that you may love: I've added support for multi-filters in assets tags:

{{ 'my-image.jpg'|theme|resize(30) }}

This will be useful when the resize filter will be fully implemented (maybe next release?)