8000 fix(webpack5): Remove 'ts-loader' from webpack 'javascript' configuration by CatchABus · Pull Request #9715 · NativeScript/NativeScript · GitHub
[go: up one dir, main page]

Skip to content

fix(webpack5): Remove 'ts-loader' from webpack 'javascript' configuration #9715

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 9 commits into from
Closed
Original file line number Diff line number Diff line change
Expand Up @@ -85,27 +85,6 @@ exports[`javascript configuration for android 1`] = `
}
]
},
/* config.module.rule('ts') */
{
test: [
/\\\\.ts$/
],
use: [
/* config.module.rule('ts').use('ts-loader') */
{
loader: 'ts-loader',
options: {
transpileOnly: true,
allowTsInNodeModules: true,
compilerOptions: {
sourceMap: true,
declaration: false
},
getCustomTransformers: function () { /* omitted long function */ }
}
}
]
},
/* config.module.rule('js') */
{
test: /\\\\.js$/,
Expand Down Expand Up @@ -408,27 +387,6 @@ exports[`javascript configuration for ios 1`] = `
}
]
},
/* config.module.rule('ts') */
{
test: [
/\\\\.ts$/
],
use: [
/* config.module.rule('ts').use('ts-loader') */
{
loader: 'ts-loader',
options: {
transpileOnly: true,
allowTsInNodeModules: true,
compilerOptions: {
sourceMap: true,
declaration: false
},
getCustomTransformers: function () { /* omitted long function */ }
}
}
]
},
/* config.module.rule('js') */
{
test: /\\\\.js$/,
Expand Down
3 changes: 3 additions & 0 deletions packages/webpack5/src/configuration/javascript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ export default function (config: Config, env: IWebpackEnv = _env): Config {
// VIRTUAL ENTRY END
`
);

// remove default ts rule
config.module.rules.delete('ts');

// exclude files starting with _ from require.context
config
Expand Down
0