Skip to content

ability to use --bundle as the default #4439

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
cowboyd opened this issue Mar 15, 2019 · 3 comments
Closed

ability to use --bundle as the default #4439

cowboyd opened this issue Mar 15, 2019 · 3 comments

Comments

@cowboyd
Copy link

cowboyd commented Mar 15, 2019

Is your feature request related to a problem? Please describe.
It seems to me that you're either using webpack to build your javascript, or you're not, and if you are, then it's really rare that you don't want to use the --bundle option. It's annoying to have to never forget to add this to every single command.

Describe the solution you'd like
Some way to set in nsconfig.json settings that --bundle is the default and to provide a --no-bundle option in the event that you don't want to bundle with webpack.

Describe alternatives you've considered

Right now, we work around this by having:

{
  "scripts": {
    "build:ios": "tns build ios --bundle",
    "build:android": "tns build android --bundle"
}

To wrap every native script command that you might want to use in order to ensure that the --bundle flag is set.

@Fatme
Copy link
Contributor

Fatme commented Mar 16, 2019

Hey @cowboyd,

We've already implemented such functionality in the NativeScript CLI. All you need is to install the next version of NativeScript CLI - npm i -g nativescript@next and add the following in your nsconfig.json file

{
    "useLegacyWorkflow": false
}

This will enable hmr by default for your project for all commands.

@cowboyd
Copy link
Author

cowboyd commented Mar 16, 2019

Awesome! That's good to know. It would be great to update the documentation to indicate that the old way is deprecated.

@Fatme
Copy link
Contributor

Fatme commented Mar 21, 2019

@cowboyd,

Here is the PR to the docs repo - https://github.com/NativeScript/docs/pull/1593.

I'm closing this as a duplicate to #4389.

@Fatme Fatme closed this as completed Mar 21, 2019
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

2 participants