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

Reduce CSS stylesheet and JavaScript code #8

Closed
lorenzschmid opened this issue Nov 28, 2020 · 0 comments
Closed

Reduce CSS stylesheet and JavaScript code #8

lorenzschmid opened this issue Nov 28, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@lorenzschmid
Copy link
Member

lorenzschmid commented Nov 28, 2020

In 9ea7bf0 PurgeCSS and Terser have been added to the workflow example to improve the size of the included code (see also #5). Unfortunately, this leads currently to the following problems:

  • Multiple leaflet CSS classes were wrongly removed
  • JavaScript code could not be effectively mangled without introducing errors

Therefore, both tools have been removed again from the workflow examples in d887b95. In order to reinstate see this patch highlighting the removed parts. For PurgeCSS, the leaflet classes should be put on a whitelist (see also current bug in purgecss#513). For both, the installed node package version should be specified.

Alternatively, it might be worth to split up the single JavaScript file into multiple ones and import them only selectively (e.g. the leaflet module is only needed on the location page). Also, not all Bootstrap components are used and thus have to be imported.

@lorenzschmid lorenzschmid added the enhancement New feature or request label Nov 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant