Skip to content
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

Installing a plugin with --link does not links the javascript file. #161

Open
3 tasks done
distante opened this issue Sep 26, 2019 · 3 comments
Open
3 tasks done
Labels
info-needed Further information is requested support

Comments

@distante
Copy link

distante commented Sep 26, 2019

Bug Report

Problem

When developing a plugin, if the plugin is installed using the --link flag each change in the source Java File is applied to the plugin on next build (the file is a symlink). The same does not happens with the JavasSript file.

What is expected to happen?

Te JavaScript file should also be somehow linked

What does actually happen?

An old javascript file lives in platforms\android\platform_www\plugins\cordova-plugin-some-name\www\SomePlugin.js

Information

As work around I use a script that appends de cordova wrapper to my javascript file and copy it.

Command or Code

cordova install some-plugin --link

Environment, Platform, Device

Tested in Windows 10 with 9.0.0 ([email protected])

Version information

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
@brodycj brodycj added info-needed Further information is requested support labels Dec 30, 2019
@brodycj
Copy link

brodycj commented Dec 30, 2019

A minimal, reproducible example is needed.

@mtamburro
Copy link

+1 on this feature request. The requestor is asking for the ability to edit (say, within Xcode) the plugin's www/JS linked files, not just source/header files (e.g., .h, .swift, etc...).

Perhaps this has not been possible because the JavaScript gets modified by Cordova when it is pulled in to the final project.

@breautek
Copy link
Contributor

Yes this is more a feature request than a bug, I'm pretty sure linking js files was something that was never supported.

Perhaps this has not been possible because the JavaScript gets modified by Cordova when it is pulled in to the final project.

I'm pretty sure this is the case, because we copy the JS file contents and insert it into another js file wrapped in a function, or something to that effect. This comes from ancient times before there were better bundling tools. We could consider using something such as rollup instead, and that may allow us to allow linking to js files and other assets. This was discussed at some point before but I couldn't find the email thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info-needed Further information is requested support
Projects
None yet
Development

No branches or pull requests

4 participants