Sublime Forum

Make html file color javascript using babel package instead of js package

#1

I want javascript code to be colored and understood with babel syntax. So I install babel sublime and then I disable js package via command palette.

Now the ES6 code are colored properly. However, the javascript code within a html file is not.

The screenshot shows javascript color messed up when embedded in script tag in html file.

What should do to make html file understand that anything that look like javascript should be read using babel package instead of js package?

0 Likes