Commit 3db9cf2e authored by Genar Trias Ortiz's avatar Genar Trias Ortiz 🎉

Start to migrate to typescript

parent 6d2a7946
......@@ -44,7 +44,7 @@ module.exports = {
appBuild: resolveApp('build'),
appPublic: resolveApp('public'),
appHtml: resolveApp('public/index.html'),
appIndexJs: resolveApp('src/index.js'),
appIndexJs: resolveApp('src/index.tsx'),
appPackageJson: resolveApp('package.json'),
appSrc: resolveApp('src'),
yarnLockFile: resolveApp('yarn.lock'),
......
......@@ -82,7 +82,7 @@ module.exports = {
// https://github.com/facebookincubator/create-react-app/issues/290
// `web` extension prefixes have been added for better support
// for React Native Web.
extensions: ['.web.js', '.mjs', '.js', '.json', '.web.jsx', '.jsx'],
extensions: ['.web.js', '.mjs', '.js', '.json', '.web.jsx', '.jsx', '.ts', '.tsx'],
alias: {
// Support React Native Web
......@@ -122,6 +122,11 @@ module.exports = {
],
include: paths.appSrc,
},
{
test: /\.(ts|tsx)$/,
loader: 'ts-loader',
include: paths.appSrc,
},
{
// "oneOf" will traverse all following loaders until one will
// match the requirements. When no loader matches it will fall
......
......@@ -3,7 +3,10 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@types/react": "^16.7.20",
"@types/react-dom": "^16.0.11",
"autoprefixer": "7.1.6",
"awesome-typescript-loader": "^5.2.1",
"axios": "^0.18.0",
"babel-core": "6.26.0",
"babel-eslint": "^10.0.1",
......@@ -57,8 +60,10 @@
"rxdb": "^8.0.2",
"rxjs": "^6.3.3",
"sass-semantic-ui": "^2.2.12-3",
"source-map-loader": "^0.2.4",
"style-loader": "0.19.0",
"sw-precache-webpack-plugin": "0.11.4",
"typescript": "^3.2.4",
"url-loader": "0.6.2",
"uuid": "^3.3.2",
"webpack": "^4.29.0",
......@@ -137,6 +142,7 @@
"redux-saga-test-plan": "^3.7.0",
"redux-thunk": "^2.2.0",
"sass-loader": "^7.1.0",
"surge": "^0.20.1"
"surge": "^0.20.1",
"ts-loader": "^5.3.3"
}
}
// @flow
import React from 'react';
import ReactDOM from 'react-dom';
import * as React from 'react';
import * as ReactDOM from 'react-dom'
import App from './App';
import registerServiceWorker from './registerServiceWorker';
......
{
"compilerOptions": {
"sourceMap": true
}
}
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment