Upgrading to 3.0.2 : Errors in previously 'clean' build
roddypratt opened this issue · 12 comments
I've been using 2.3.7 for a while without issues. Upgraded to 3.0.2, and suddenly I see loads of errors in the build.
Most are JQuery related, like
ERROR in ./src/buttonbus.ts
[tsl] ERROR in C:\WebCentre\src\buttonbus.ts(30,11)
TS2304: Cannot find name 'JQuery'.
I'm using TS 2.5.3, Webpack 3.7.1
Webpack.js has this snippet
{
test: /\.ts$/,
loader: 'ts-loader',
options: {
logLevel: "info"
}
},
... and my tsconfig.json looks like this.
{
"compileOnsave": true,
"compilerOptions": {
"module": "es6",
"removeComments": true,
"outDir": "js_out",
"allowJs": true,
"sourceMap": true,
"noImplicitAny" : false,
"noUnusedLocals": false,
"noImplicitReturns": true,
"noImplicitThis": true,
"forceConsistentCasingInFileNames": true,
"target": "es6",
"types" : ["fb", "gapi.youtube"]
},
"include": [ "src/*.ts" ]
}
Any suggestions welcome. I appreciate there's a big change to V3 but I can't see anything relevant in the options that I'd need to adjust?
Do you want to try adding entryFileCannotBeJs: true as an option? That's the only thing that occurs...
Would you be able to supply a minimal reproduction of the issue if that doesn't work? I'm really keen not to break people's projects. It's a breaking changes release but I was anticipating that most of the breaking changes wouldn't affect anyone. I've had some publishing issues with npm today so I'm trying to isolate the problem
Thanks! entryFileCannotBeJs: true fixes it. (Also, removing the allowJs:true from my tsconfig.json works - I'm not actually sure why that was there in the first place...)
Great! Would you still be able to supply me with a minimal repro of the issue?. I think what you've stumbled on is a bug in ts-loader that I'd like to fix. But without being able to reproduce it, I can't!
Sure. I'll see what I can do...
Thanks - I appreciate it
@johnnyreilly Fairly minimal example here. Better late than never...
https://github.com/roddypratt/tsloaderbug
Hopefully this will back up that this is a dupe of 657.
Thanks @roddypratt - I'll use it to double check.
Looking good so far - hopefully v3.0.3 of ts-loader will remove the need to use entryFileCannotBeJs: true
Fix released with 3.0.3
Verified fixed!
Sweet!