Open giyyapan opened 6 years ago
hi,
versions: node v8.11.3 windows 7 pro x64 my versions in package.json are:
"devDependencies": {
"@types/socket.io": "^1.4.0",
"parcel": "^1.9.7",
"parcel-plugin-typescript": "^1.0.0",
"typescript": "^2.9.2"
},
"dependencies": {
"phaser": "^3.11.0",
"socket.io": "^1.4.0"
}
my tsconfig.json, which might be horrible since i am new to typescript, and especially because i guess i have to try to base it off of parcel's hidden internal default? At any rate, when i do "tsc -p ." i do not get any errors fwiw.
{
"compilerOptions": {
"pretty": false,
"module": "commonjs",
"esModuleInterop": true,
"jsx": "preserve",
"baseUrl": "./src",
"paths": {
"src/*": ["./src/*"],
},
"noEmit": false,
"noImplicitAny": true,
"removeComments": true,
"preserveConstEnums": true,
"sourceMap": true,
"strict": true,
},
"include": [
"src/**/*.ts",
"lib/types/phaser.comments.d.ts"
],
"exclude": [
"node_modules"
],
}
Had the same problem (without comments in the tsconfig.json), got rid of it by adding an empty "parelTsPluginOptions under compileroptions.
Like so: "parcelTsPluginOptions": {}
On further inspection a trailing comma from inside the compilerOptions might be what caused this. Removed the line I mentioned above and a trailing comma and the "Unexpected token }" error is now gone.
@raould : try to change your config to this:
{
"compilerOptions": {
"pretty": false,
"module": "commonjs",
"esModuleInterop": true,
"jsx": "preserve",
"baseUrl": "./src",
"paths": {
"src/*": ["./src/*"]
},
"noEmit": false,
"noImplicitAny": true,
"removeComments": true,
"preserveConstEnums": true,
"sourceMap": true,
"strict": true
},
"include": ["src/**/*.ts", "lib/types/phaser.comments.d.ts"],
"exclude": ["node_modules"]
}
Hi all,
The default typescript loader works fine for me, but after I install parcel-plugin-typescript and restart parcel, this error appear. (and no type check result )
This is my tsconfig.json:
Let me know if you need more information.