Skip to content
This repository has been archived by the owner on Dec 18, 2018. It is now read-only.

Difficulties with webpack #2

Closed
andruhon opened this issue Feb 16, 2016 · 4 comments
Closed

Difficulties with webpack #2

andruhon opened this issue Feb 16, 2016 · 4 comments

Comments

@andruhon
Copy link

Is there a streamline way to configure it with the webpack?

Example:
I install retyped-react-router-redux-tsd-ambient and it makes my IDE happy,
however webpack responds:
ERROR in [default] C:/local_projects/howick/HLC2/app/src/index.tsx:6:42 Cannot find module 'react-router-redux'.

Copied definitions back into typings/react-router-redux, to make it work.

@shyiko
Copy link
Owner

shyiko commented Feb 16, 2016

@andruhon Hi. I'm planning to publish typescript boilerplate repo that will show how to use it all together, but until than - make sure that:

  1. you haven't forgot to run 'tsdm rewire' after installing retyped-react-router-redux-tsd-ambient (i.e. typings/tsd.d.ts contains reference to react-router-redux's .d.ts)
  2. webpack's typescript loader is aware of typings/tsd.d.ts (e.g. tsconfig.json contains "files": ["typings/tsd.d.ts", ...]).
    Can you please tell what webpack typescript loader you are using (if you could provide webpack config, tsconfig.json and typings/tsd.d.ts - that would be perfect)? Thank you.

@andruhon
Copy link
Author

Ah. I see. I was not aware of 'tsdm rewire'. I'm using awesome-typescript-loader

@andruhon
Copy link
Author

Ah. I see. I was not aware of 'tsdm rewire'. Now I can confirm that it works after tsdm rewire. I also found that It cannot properly coexist with tsd, because it nuked all records in typings/tsd.d.ts

@shyiko
Copy link
Owner

shyiko commented Feb 16, 2016

@andruhon 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants