-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue
Milestone
Description
TypeScript Version: 2.1.4 and nightly (2.2.0-dev.201xxxxx)
Code
import 'normalize.css';
tsconfig
{
"compilerOptions": {
"moduleResolution": "node"
},
"exclude": [
"node_modules"
]
}
Expected behavior:
Tsc should compile without error as ts 2.0.10 does.
This kind of import are handled by webpack that injects the css at runtime.
Actual behavior:
Running tsc 2.1.4 fails with the following error
Error: Debug Failure. False expression: File /home/sarod/dev/git/tsloader-ts2-1/node_modules/normalize.css/normalize.css has unknown extension.
at Object.assert (/home/sarod/dev/git/tsloader-ts2-1/node_modules/typescript/lib/tsc.js:1796:23)
at Object.fail (/home/sarod/dev/git/tsloader-ts2-1/node_modules/typescript/lib/tsc.js:1801:19)
at Object.extensionFromPath (/home/sarod/dev/git/tsloader-ts2-1/node_modules/typescript/lib/tsc.js:1912:15)
at resolvedFromAnyFile (/home/sarod/dev/git/tsloader-ts2-1/node_modules/typescript/lib/tsc.js:18928:44)
at loadNodeModuleFromDirectory (/home/sarod/dev/git/tsloader-ts2-1/node_modules/typescript/lib/tsc.js:19382:28)
at loadModuleFromNodeModulesFolder (/home/sarod/dev/git/tsloader-ts2-1/node_modules/typescript/lib/tsc.js:19411:13)
at loadModuleFromNodeModulesOneLevel (/home/sarod/dev/git/tsloader-ts2-1/node_modules/typescript/lib/tsc.js:19428:53)
at /home/sarod/dev/git/tsloader-ts2-1/node_modules/typescript/lib/tsc.js:19422:24
at forEachAncestorDirectory (/home/sarod/dev/git/tsloader-ts2-1/node_modules/typescript/lib/tsc.js:19480:26)
at loadModuleFromNodeModulesWorker (/home/sarod/dev/git/tsloader-ts2-1/node_modules/typescript/lib/tsc.js:19420:16)
I initially thought it was a ts-loader issue that fails with another error on the same code (see TypeStrong/ts-loader#416)
This public repro can be used to reproduce https://github.com/sarod/ts-loader-issue416
roypeled
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue