If you're looking to achieve compatibility with EcmaScript 3, consider using Typescript. It allows you to build code that is compatible with EcmaScript 3.
To get started with TypeScript, simply create a basic project in Visual Studio (or VSCode/Sublime/WebStorm) and configure the tsconfig.json
file as shown below:
{
"compilerOptions": {
"target": "es3",
"declaration": true,
"noImplicitAny": false,
"removeComments": true,
"noLib": false,
"emitDecoratorMetadata": true,
"sourceMap": true,
"listFiles": true,
"outDir": "",
"out": "./Compiled/myfile.js",
"experimentalDecorators": true
},
"files": [
"myfile.ts"
]
}
Best of luck on your TypeScript journey!
Check out these related resources:
- TypeScript in WebStorm
- TypeScript Sublime Plugin
- TypeScript in VS Code