10000 fix: remove .ts and {platform}.ts from resolve rules · NativeScript/NativeScript@d6b1d60 · GitHub
[go: up one dir, main page]

Skip to content

Commit d6b1d60

Browse files
committed
fix: remove .ts and {platform}.ts from resolve rules
1 parent 0b6ce01 commit d6b1d60

File tree

1 file changed

+4
-0
lines changed
  • packages/webpack5/src/configuration

1 file changed

+4
-0
lines changed

packages/webpack5/src/configuration/base.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,10 @@ export default function (config: Config, env: IWebpackEnv = _env): Config {
237237
configFile: resolve(__dirname, '../stubs/tsconfig.default.json'),
238238
context: getProjectRootPath(),
239239
};
240+
241+
// if the project doesn't have a ts config - we don't want to automatically resolve to .ts files
242+
// in these cases the file would need to be explicitly imported with the .ts extension to be processed.
243+
config.resolve.extensions.delete(`.${platform}.ts`).delete('.ts');
240244
}
241245

242246
// set up ts support

0 commit comments

Comments
 (0)
0