S
S
shasoft2020-08-27 22:31:40
Visual Studio Code
shasoft, 2020-08-27 22:31:40

How do I prevent PHP code inserts in a .js file from being formatted?

I use VSCode and in .js files I have inserts of PHP code of the form When saving, VSCode formats php insert as JS code and it breaks. Can I tweak the settings to prevent this from happening? ps when building through webpack php, the code is replaced with its value using loader
var a = <?php echo json_encode($_SERVER); ?>;


Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question