New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HMR, and plugin development (npm link) issues #656

Open
NathanaelA opened this Issue Sep 14, 2018 · 1 comment

Comments

Projects
None yet
3 participants
@NathanaelA

NathanaelA commented Sep 14, 2018

Issue Checklist

  • You are submitting: a bug report.
  • You verified that this is a real problem by searching the [NativeScript Forum] and the other [issues] in this repo.
  • You checked our [demo apps] and the [documentation] for sample usage.

Tell us about the problem

HMR works fine for all the files in the app EXCEPT for any files that are in a junction on windows. When you are doing plugin development (including the nativescript-plugin-seed) the directory "../src" that is symlinked/junctioned is not watched for HMR changes.

You can duplicate this issue by cloning almost any one of my repos that is setup for NS 4 development and has a demo included. The simplist one is https://github.com/NathanaelA/nativescript-localstorage/ and then just add webpack, and do a npm i and then when you run it with --hmr enabled; you can try and modify the ../src/localstorage.js and you will see it is ignored.

This issue stems from this issue: webpack/watchpack#61
Which already has a PR on: webpack/watchpack#72
And a webpack request to expose on: webpack/webpack#6845

Manually changing watchpack source and the followSymlinks: true allows this to work.

Local environment

  • Platform: Windows (unsure on Linux/Mac)
  • NativeScript CLI version 4.3.0-2018-09-12-12207
  • NS-WebPack: "^0.17.0-2018-09-12-02"

Project data

  • Platform you are building the app for: Android
  • Node dependencies:
  "dependencies": {
    "nativescript-localstorage": "file:../src",
    "nativescript-theme-core": "~1.0.4",
    "tns-core-modules": "^4.2.0"
  },
  "devDependencies": {
    "babel-traverse": "6.4.5",
    "babel-types": "6.4.5",
    "babylon": "6.4.5",
    "lazy": "1.0.11",
    "nativescript-dev-webpack": "^0.17.0-2018-09-12-02"
  }
  • Webpack configuration:
Unmodified webpack configuration installed by 0.17

Related partially to this issue: NativeScript/nativescript-cli#3890

cc: @vtrifonov

@NickIliev NickIliev added the bug label Sep 25, 2018

@sis0k0

This comment has been minimized.

Collaborator

sis0k0 commented Oct 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment