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

ensure inline <script> and <style> tags are getting minified / optimized when running build command #581

Closed
1 of 5 tasks
thescientist13 opened this issue Apr 29, 2021 · 0 comments · Fixed by #974 or #979
Closed
1 of 5 tasks
Assignees
Labels
alpha.0 CLI enhancement Improve something existing (e.g. no docs, new APIs, etc) v0.27.0

Comments

@thescientist13
Copy link
Member

Type of Change

  • New Feature Request
  • Documentation / Website
  • Improvement / Suggestion
  • Bug
  • Other (please clarify below)

Summary

Coming out of #573 , it was noted that when Rollup is processing <script> and<style> tags in the <head> they should get appropriately minified and have any standard optimizations happen to them.

For example, the inline <script> tags for the shelf are not getting minified at all in the final output.

<script>
  window.onload = () => {
    const route = window.location.pathname.split('/')[1];
   
    document.getElementsByTagName('app-shelf')[0].setAttribute('page', route);
  } 
</script>

Details

This should avoid any pre-processing, and should ideally be limited to the optimize method of the ResourceInterface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alpha.0 CLI enhancement Improve something existing (e.g. no docs, new APIs, etc) v0.27.0
Projects
None yet
1 participant