[Vuejs]-Set webpack environmental variable for apache2

0👍

I doubt this is possible but as a solution I would propose to implement a custom condition (described here in the manual https://docs.typo3.org/typo3cms/CoreApiReference/ApiOverview/TypoScriptSyntax/TypoScriptParserApi/CustomConditions.html) and check within that e.g with a request if the node server is responding.

0👍

Hi Georg and all others,

a custom condition would be a solution, but I don’t want to influence the production environment (e.g. pinging for a response from node server).

I made it with two shell scripts, executed by webpack-shell-plugin.
The first script is triggered “onBuildStart”, looking for an .htaccess file and adding

SetEnv TYPO3_CONTEXT Development/NodeServer

to the end of the file.
Unfortunately there is no event fired when the node server is shut down. As a workaround, I added a new npm run script, which just executes a shell script to delete that line from .htaccess again.

I guess there is a besser solution, but at this time, it solves my (very little) problem to avoid changing the JS includes every time I start to develop.

Leave a comment