Skip to content

[TypeScript & Vue project] When using --bundle changes made to a platform specific file in node_modules does not start a new build process #4480

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

Closed
VladimirAmiorkov opened this issue Mar 28, 2019 · 0 comments
Assignees
Milestone

Comments

@VladimirAmiorkov
Copy link

Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI: 5.3.0-2019-03-27-13090
  • Cross-platform modules: 5.3.0
  • Android Runtime: 5.2.0
  • iOS Runtime: 5.2.0

Describe the bug
When developing an NativeScript plugin and using the following workflow, any changes to the .ts files of the developed plugin do not trigger sync to the device:
Workflow:

  • Use a symlink to the src folder which hold the plugin's source code tns plugin add ...
  • Run the NativeScript typescript application using bundle tns run ios --bundle
  • Make a changes to one of the platform specific files of the plugin's source code (.android.ts or .ios.ts)
  • No changes are detected and the already running app is not updated with those changes

To Reproduce
Use the above workflow with any plugin that is created from the plugin-seed like nativescript-picker, run its demo and make a change in the picker.ios.ts file.

Expected behavior
Doing the above should force a webpack build and a refresh of the app in the simulator/device without full build (a.k.a a live sync).

Sample project
A demo project can be found here, use the above workflow to build it.

@Fatme Fatme changed the title [TypeScript Project] When using --budnle changes made to a platform specific file in node_modules does not start a new build process [TypeScript Project] When using --bundle changes made to a platform specific file in node_modules does not start a new build process Mar 28, 2019
@Fatme Fatme added this to the 6.0.0 milestone Mar 28, 2019
@VladimirAmiorkov VladimirAmiorkov changed the title [TypeScript Project] When using --bundle changes made to a platform specific file in node_modules does not start a new build process [TypeScript & Vue project] When using --bundle changes made to a platform specific file in node_modules does not start a new build process Mar 28, 2019
@rosen-vladimirov rosen-vladimirov modified the milestones: 6.0.0, 5.4.0 Apr 1, 2019
@Fatme Fatme self-assigned this Apr 8, 2019
@rosen-vladimirov rosen-vladimirov modified the milestones: 5.4.0, 6.0.0 Apr 22, 2019
Fatme added a commit to NativeScript/nativescript-dev-webpack that referenced this issue May 31, 2019
Fatme added a commit to NativeScript/nativescript-dev-webpack that referenced this issue Jun 5, 2019
Fatme added a commit to NativeScript/nativescript-dev-webpack that referenced this issue Jun 6, 2019
Fatme added a commit to NativeScript/nativescript-dev-webpack that referenced this issue Jun 10, 2019
Fatme added a commit to NativeScript/nativescript-dev-webpack that referenced this issue Jun 12, 2019
Fatme added a commit to NativeScript/nativescript-dev-webpack that referenced this issue Jun 15, 2019
rosen-vladimirov pushed a commit to NativeScript/nativescript-dev-webpack that referenced this issue Jun 19, 2019
* fix: don't provide fake paths to the {N} CLI - relative to the `app` folder

* feat: remove not needed hooks

* feat: remove webpack compiler logic

* fix: don't copy app_resources to the platforms folder

* fix: respect --env.verbose

* feat: respect production mode based on release option

Implements: #911

* fix: watch platform specific files from node_modules

Rel to: NativeScript/nativescript-cli#4480

* fix: don't emit absolute webpack's runtime files

Previously we needed to emit files with full paths as {N} CLI relies on this and expected them in a such format. With the changes for "webpack-only" mode, {N} CLI expects only relative paths. So we need to fix this in order to ensure that runtime.js file will not be transferred on device on change in hmr mode.

* fix: don't process runtime.js files

We needed a special processing for `runtime.js` files as we excluded them when transferring the files on device. As the CLI is filtering and emit only hot-update files we don't need this logic anymore.

* fix: emit runtime files and entry point files

* fix: update webpack config files of demo apps

* fix: don't use short imports in demo apps

* fix: update dependencies of demo apps so they are compatible with 6.0 release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants