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

Allow specification of the www dir to allow compatibility with Ionic + Capacitor builds #77

Open
colossatr0n opened this issue Oct 11, 2021 · 0 comments

Comments

@colossatr0n
Copy link

colossatr0n commented Oct 11, 2021

In Ionic + Capacitor IOS builds the www directory is called public.

If the www directory name could be specified in the config, then Ionic + Capacitor users could benefit from this plugin.

To maintain backwards compatibility for Cordova users, a www_dir_name variable could be added to the config that would allow the user to specify the name of the www directory:

var capacitorCompatibleConfig = {
        'www_dir_name': 'public',  // NEW: Use "public" instead of "www"
	'www_root': '',           // Defaults to www_dir_name, which is now "public".
	'port': 8888,
	'localhost_only': false
};

// Backwards compatible defaults for Cordova users
var default = {
        'www_dir_name': 'www',  // Set default to www
	'www_root': '',         // Defaults to www_dir_name, which is www
	'port': 8888,
	'localhost_only': false
};

Both this issue and this issue will need to be resolved to fully support Ionic + Capacitor builds.

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

No branches or pull requests

1 participant