Skip to content
This repository was archived by the owner on Dec 1, 2019. It is now read-only.
This repository was archived by the owner on Dec 1, 2019. It is now read-only.

TS1056: Accessors are only available when targeting ECMAScript 5 and higher. #640

Open
@guoliang

Description

@guoliang

I'm running webpack with awesome-typescript-loader, and I get the error saying that Accessors are only available with es5. The thing is that in my tsconfig.json it already says target is es5. But somehow the loader doesn't pick it up.

My webpack config looks as following

const path = require("path");

module.exports = {
	entry: "./src/appbuilder/designer/app.ts",
	output: {
		path: path.resolve(__dirname, "dist"),
		filename: "appbuilder.js"
	},
	resolve: {
		extensions: [".ts", ".tsx", ".js", ".jsx"],
	},
	module: {
		rules: [
			{
				test: /\.tsx?$/,
				loader: "awesome-typescript-loader",
				options: {
					configFileName: path.resolve(__dirname, "appbuilder/tsconfig.json")
				}
			}
		]
	},
};


And my tsconfig.json looks like following

{
	"compileOnSave": true,
	"compilerOptions": {
		"declaration": true,
		"noImplicitAny": true,
		"noImplicitReturns": true,
		"preserveConstEnums": true,
		"sourceMap": true,
		"target": "es5"
	}
}

Is there some obvious errors in my configurations?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions