Skip to content

Commit 144acd2

Browse files
author
David Paz
committed
Cleaning up unnecessary code.
* Remove .json from resolved extensions. * Remove not needed configuration options in tests. * Remove assertion on tests for styles.
1 parent f6bc6e7 commit 144acd2

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

lib/config-generator.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,6 @@ class ConfigGenerator {
6969
config.stats = this.buildStatsConfig();
7070

7171
let extensions = ['.js', '.jsx', '.ts', '.tsx'];
72-
if (this.webpackConfig.useTypeScriptLoader) {
73-
extensions.push('.json');
74-
}
7572

7673
config.resolve = {
7774
extensions: extensions

test/functional.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -611,9 +611,6 @@ module.exports = {
611611

612612
// assert that the ts module rendered
613613
browser.assert.text('#app h1', 'Welcome to Your TypeScript App');
614-
// make sure the styles are not inline
615-
browser.assert.elements('style', 0);
616-
617614
done();
618615
}
619616
);
@@ -625,9 +622,8 @@ module.exports = {
625622
config.setPublicPath('/build');
626623
config.addEntry('main', ['./js/CoolReactComponent.jsx', './js/render2.tsx']);
627624
config.enableReactPreset();
628-
config.configureTypeScript(function(tsConfig) {
629-
tsConfig.compilerOptions = { 'jsx': 'preserve' };
630-
});
625+
const testCallback = () => {};
626+
config.enableTypeScriptLoader(testCallback);
631627

632628
testSetup.runWebpack(config, (webpackAssert) => {
633629
// check that babel transformed the JSX

0 commit comments

Comments
 (0)