Skip to content
This repository was archived by the owner on Dec 5, 2022. It is now read-only.

Using --env.production breaks SegmentedBar #105

Closed
Reached opened this issue Oct 3, 2018 · 4 comments · Fixed by NativeScript/nativescript-dev-webpack#743
Closed

Using --env.production breaks SegmentedBar #105

Reached opened this issue Oct 3, 2018 · 4 comments · Fixed by NativeScript/nativescript-dev-webpack#743

Comments

@Reached
Copy link

Reached commented Oct 3, 2018

Version

Latest version of vue-cli-template and Nativescript Vue (basically bootstrapped a blank project to test this out)

Reproduction link

https://github.com/Reached/hockey-test

Platform and OS info

iOS 11-12, MacOS 10.11.4 - simulator and real devices

Steps to reproduce

npm install and
tns run ios --bundle --env.production


running tns run ios --bundle without --env.production works as expected

What is expected?

Segmented bar shows up on the screen

What is actually happening?

The screen is empty/blank

@rigor789
Copy link
Member

rigor789 commented Oct 3, 2018

I noticed the same with FormattedString, but haven't been able to identify the issue...

@rigor789
Copy link
Member

rigor789 commented Oct 9, 2018

To fix the issue, make the changes from c74f1cd in your webpack.config.js

@Reached
Copy link
Author

Reached commented Oct 15, 2018

Thanks @rigor789 and nice find!

@nativescript-vue-bot
Copy link
Collaborator

We are locking this issue because it has been closed for more than 14 days.

If the issue comes up again please open a new issue with additional details.

@nativescript-vue nativescript-vue locked as resolved and limited conversation to collaborators Oct 22, 2018
sis0k0 pushed a commit to NativeScript/nativescript-dev-webpack that referenced this issue Dec 19, 2018
…ion mode (#743)

## PR Checklist

- [X] The PR title follows our guidelines: https://github.com/NativeScript/NativeScript/blob/master/CONTRIBUTING.md#commit-messages.
- [X] There is an issue for the bug/feature this PR is for. To avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it.
- [X] All existing tests are passing: https://github.com/NativeScript/nativescript-dev-webpack/blob/master/CONTRIBUTING.md#testing-locally-by-running-e2e-tests

## What is the current behavior?
When building {N} Vue apps in production mode the function names are renamed by UglifyJS to make the bundle smaller.
This causes problems when some `tns-core-modules` components are renamed (`SegmentedBar`, `FormattedString`).

```
tns run ios --bundle --env.production
```

## What is the new behavior?
The function names are not renamed anymore.

fixes nativescript-vue/vue-cli-template#105 for the {N} CLI Vue template.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging a pull request may close this issue.

3 participants