Skip to content
This repository was archived by the owner on Jan 26, 2019. It is now read-only.

Migrate ts-loader to awesome-typescript-loader #74

Closed
wants to merge 15 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"@types/node": "^7.0.21",
"@types/react": "^15.0.24",
"@types/react-dom": "^15.5.0",
"babel-core": "^6.24.1",
"eslint": "3.19.0",
"husky": "^0.13.2",
"lerna": "2.0.0-beta.38",
Expand Down
3 changes: 3 additions & 0 deletions packages/react-scripts/config/paths.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ module.exports = {
appHtml: resolveApp('public/index.html'),
appIndexJs: resolveApp('src/index.tsx'),
appPackageJson: resolveApp('package.json'),
appTsConfig: resolveApp('tsconfig.json'),
appSrc: resolveApp('src'),
yarnLockFile: resolveApp('yarn.lock'),
testsSetup: resolveApp('src/setupTests.ts'),
Expand All @@ -76,6 +77,7 @@ module.exports = {
appHtml: resolveApp('public/index.html'),
appIndexJs: resolveApp('src/index.tsx'),
appPackageJson: resolveApp('package.json'),
appTsConfig: resolveApp('tsconfig.json'),
appSrc: resolveApp('src'),
yarnLockFile: resolveApp('yarn.lock'),
testsSetup: resolveApp('src/setupTests.ts'),
Expand Down Expand Up @@ -105,6 +107,7 @@ if (
appHtml: resolveOwn('template/public/index.html'),
appIndexJs: resolveOwn('template/src/index.tsx'),
appPackageJson: resolveOwn('package.json'),
appTsConfig: resolveOwn('template/tsconfig.json'),
appSrc: resolveOwn('template/src'),
yarnLockFile: resolveOwn('template/yarn.lock'),
testsSetup: resolveOwn('template/src/setupTests.ts'),
Expand Down
6 changes: 5 additions & 1 deletion packages/react-scripts/config/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,11 @@ module.exports = {
{
test: /\.(ts|tsx)$/,
include: paths.appSrc,
loader: require.resolve('ts-loader'),
loader: require.resolve('awesome-typescript-loader'),
query: {
useBabel: true,
configFileName: paths.appTsConfig,
},
},
// "postcss" loader applies autoprefixer to our CSS.
// "css" loader resolves paths in CSS and adds assets as dependencies.
Expand Down
6 changes: 5 additions & 1 deletion packages/react-scripts/config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,11 @@ module.exports = {
{
test: /\.(ts|tsx)$/,
include: paths.appSrc,
loader: require.resolve('ts-loader'),
loader: require.resolve('awesome-typescript-loader'),
query: {
useBabel: true,
configFileName: paths.appTsConfig,
},
},
// The notation here is somewhat confusing.
// "postcss" loader applies autoprefixer to our CSS.
Expand Down
8 changes: 4 additions & 4 deletions packages/react-scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@
"react-scripts-ts": "./bin/react-scripts-ts.js"
},
"dependencies": {
"autoprefixer": "7.1.0",
"app-root-path": "^2.0.1",
"autoprefixer": "7.1.0",
"awesome-typescript-loader": "^3.1.3",
"case-sensitive-paths-webpack-plugin": "2.0.0",
"chalk": "1.1.3",
"cli-highlight": "1.1.4",
Expand All @@ -38,16 +39,15 @@
"postcss-flexbugs-fixes": "3.0.0",
"postcss-loader": "2.0.5",
"promise": "7.1.1",
"source-map-loader": "^0.2.1",
"react-dev-utils": "^2.0.1",
"react-error-overlay": "^1.0.6",
"style-loader": "0.17.0",
"ts-loader": "^2.0.3",
"sw-precache-webpack-plugin": "0.9.1",
"tslint": "^5.2.0",
"tslint-loader": "^3.5.3",
"tslint-react": "^3.0.0",
"typescript": "^2.3.3",
"source-map-loader": "^0.2.1",
"sw-precache-webpack-plugin": "0.9.1",
"url-loader": "0.5.8",
"webpack": "2.6.0",
"webpack-dev-server": "2.4.5",
Expand Down
3 changes: 2 additions & 1 deletion packages/react-scripts/template/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"allowJs": true,
"jsx": "react",
"moduleResolution": "node",
"rootDir": "src",
"rootDir": "src",
"forceConsistentCasingInFileNames": true,
"noImplicitReturns": true,
"noImplicitThis": true,
Expand All @@ -20,6 +20,7 @@
"exclude": [
"node_modules",
"build",
"config",
"scripts",
"acceptance-tests",
"webpack",
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy