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

upgrades, moment-locales-webpack-plugin integration, easier bundle-analyzer, dutch translations #3707

Merged
merged 2 commits into from
Jul 18, 2018

Conversation

PieterGit
Copy link
Contributor

@PieterGit PieterGit commented Jul 18, 2018

  1. webpack 4.16.0 gives problem with report test on Windows
Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.
Arguments:
[0] _isAMomentObject: true, _isUTC: true, _useUTC: true, _l: undefined, _i: T00:00:00, _f: undefined, _strict: undefined, _locale: [object Object]
Error
    at Function.createFromInputFallback (E:\Git\src\cgm-remote-monitor\tmp\js\bundle.js:1:5989)

fixed it with an upgrade to 4.16.1

  1. a lot of moment-locales are packaged with webpack. Limit to language that are available in Nightscout. Note that dk is not available in moment.js. This decreases
    js/bundle.js from 1.86 MiB to 1.72 MiB.

  2. make it possible to use npm run bundle-analyzer so that webpack.config.js does not have to be changed in order to run the bundle-analyzer

  3. add missing Dutch translations

…alyzer

1. webpack 4.16.0 gives problem with report test on Windows
```
Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.
Arguments:
[0] _isAMomentObject: true, _isUTC: true, _useUTC: true, _l: undefined, _i: T00:00:00, _f: undefined, _strict: undefined, _locale: [object Object]
Error
    at Function.createFromInputFallback (E:\Git\src\cgm-remote-monitor\tmp\js\bundle.js:1:5989)
```

2. a lot of moment-locales are packacked with webpack. Limit to language that are availble in Nightscout

3. make it possible to use `npm run bundle-analyzer` so that webpack.config.js does not have to be changed
@PieterGit PieterGit merged commit 325fe5f into nightscout:dev Jul 18, 2018
@PieterGit
Copy link
Contributor Author

More info on 2. the moment-locals.

Here's an overview of the bundle before the PR:
image

And here is an overview of the bundle after this PR:
image

@PieterGit
Copy link
Contributor Author

PieterGit commented Jul 25, 2018

Detailed view

Before:
image

After:
image

@PieterGit PieterGit deleted the 201807_merge branch December 24, 2018 12:39
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

Successfully merging this pull request may close these issues.

1 participant