Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

TypeScript projects are getting JavaScript webpack.config #716

Closed
DimitarTachev opened this issue Nov 20, 2018 · 0 comments
Closed

TypeScript projects are getting JavaScript webpack.config #716

DimitarTachev opened this issue Nov 20, 2018 · 0 comments

Comments

@DimitarTachev
Copy link
Contributor

Environment

  • CLI: next
  • nativescript-dev-webpack: ~0.18.0

Describe the bug
We don't have the typescript dependency hardcoded in our templates anymore and we depend on the nativescript-dev-typescript postinstall script to generate it.

It seems that npm is executing the postintalls script in alphabetical order and the nativescript-dev-typescript plugin is generating the typescript dependency before the postintall script of nativescript-dev-webpack. In this way, everything is working as expected.

However, when the NativeScript CLI is used with yarn instead of npm, the postinstall scripts are run in parallell and the nativescript-dev-webpack plugin is copying the javascript webpack.config instead of the typescript one because the typescript dependency is still missing.

To Reproduce

  1. npm i nativescript@next -g
  2. tns package-manager set yarn
  3. tns create typescriptBug --ts (the webpack plugin postinstall will copy the JavaScript templated instead of the TypeScript one)
  4. tns run --bundle

Expected behavior
The app should run properly instead of getting "ERROR in Entry module not found: Error: Can't resolve './app.js' in '/typescriptBug/app'"

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