Code Monkey home page Code Monkey logo

react-app-rewire-typescript's Issues

Add basic example of tsconfig.json on the README

I am confused of where should I put outDir in the configuration so will be great if you could add some basic setup that people could follow

P.S: this is my first time with Typescript so basically this would help beginners ๐Ÿ”ฐ

Run typescript tests

Thank you for creating this plugin, I successfully integrated it with create-react-app and antd. However when I'm running the tests, files with *.test.ts are not being detected.

Here is my package.json scripts

 "scripts": {
    "start": "react-app-rewired start",
    "build": "react-app-rewired build",
    "test": "react-app-rewired test --env=jsdom",
    "eject": "react-app-rewired eject"
  },

Is there an extra step I need to do?

Unable to use react-app-rewire-typescript

I'm using latest create-react-app:

const rewireTypescript = require('react-app-rewire-typescript')

module.exports = function override(config, env) {
  config = rewireTypescript(config, env)
  return config
}
C:\projects\my-app>npm start

> [email protected] start C:\projects\my-app
> react-app-rewired start

C:\projects\my-app\node_modules\react-app-rewire-typescript\index.js:41
  const { index, rules } = findIndexAndRules(rulesSource, ruleMatcher)
                           ^

TypeError: Cannot match against 'undefined' or 'null'.
    at addBeforeRule (C:\projects\my-app\node_modules\react-app-rewire-typescript\index.js:41:28)
    at rewireTypescript (C:\projects\my-app\node_modules\react-app-rewire-typescript\index.js:87:3)
    at override (C:\projects\my-app\config-overrides.js:22:12)
    at Object.<anonymous> (C:\projects\my-app\node_modules\react-app-rewired\scripts\start.js:16:3)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.runMain (module.js:605:10)
    at run (bootstrap_node.js:423:7)
    at startup (bootstrap_node.js:147:9)
    at bootstrap_node.js:538:3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.