Closed
Description
π Search Terms
allowArbitraryExtensions
π Version & Regression Information
- This is unexpected error from Typescript@5.0
β― Playground Link
https://codesandbox.io/p/sandbox/typescript-playground-export-forked-mfz7rg?file=/index.ts:10,28
π» Code
import {} from "./app.css";
export {};
my tsconfig.json
{
"compileOnSave": false,
"compilerOptions": {
"module": "ESNext",
"target": "ESNext",
"lib": [
"ESNext",
"DOM",
"DOM.Iterable"
],
"moduleResolution": "bundler",
"customConditions": [
"dev"
],
"jsx": "react-jsx",
"declaration": true,
"emitDeclarationOnly": true,
"isolatedModules": true,
"strict": true,
"allowJs": true,
"skipDefaultLibCheck": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"allowArbitraryExtensions": true,
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"sourceMap": false,
"rootDirs": [
"./src",
"./esm"
],
"outDir": "./esm"
},
"include": [
"./src/**/*"
]
}
π Actual behavior
I have set allowArbitraryExtensions
to true, but it still throw error when import a .css
file.
As mentioned in document:
you can suppress the error with the new
--allowArbitraryExtensions
compiler option.
π Expected behavior
should not throw error