I am incorrectly getting the following error, "This can only be used with ES6. Make sure to have a jsconfig.json-file which sets the target to ES6".
Furthermore, I think I may have stumbled upon a weird case where if the start of the file name is "temp" as in "temp.js", "temporary.js", or "temp123.js" it will cause this error.
To reproduce:
Create a file called temp.js with some ES6 code, such as:
The above error is now showing. To fix it, create the jsconfig.json file which sets the target to ES6:
{
"compilerOptions": {
"target": "ES6"
}
}
The error is still showing, now incorrectly.
If I rename "temp.js" to "test.js" (or anything that doesn't start with 'temp') the error goes away. Or, if I create a files array in jsconfig.json which lists "temp.js", the error goes away:
{
"compilerOptions": {
"target": "ES6"
},
"files": [
"temp.js"
]
}
I don't want to have to do this for every file in my project.
I'm running on Windows 7, 64-bit.
Thanks
I am incorrectly getting the following error, "This can only be used with ES6. Make sure to have a jsconfig.json-file which sets the target to ES6".
Furthermore, I think I may have stumbled upon a weird case where if the start of the file name is "temp" as in "temp.js", "temporary.js", or "temp123.js" it will cause this error.
To reproduce:
Create a file called temp.js with some ES6 code, such as:
The above error is now showing. To fix it, create the jsconfig.json file which sets the target to ES6:
The error is still showing, now incorrectly.
If I rename "temp.js" to "test.js" (or anything that doesn't start with 'temp') the error goes away. Or, if I create a files array in jsconfig.json which lists "temp.js", the error goes away:
I don't want to have to do this for every file in my project.
I'm running on Windows 7, 64-bit.
Thanks