Skip to content

Do not build Brotli files for the dev mode bundle #16028

Closed

Description

@Artur-

Describe your motivation

When you have an application specific bundle, it looks weird that you have both an indexhtml.js.foo and an indexhtml.js.foo.br. Especially when you are supposed to commit the bundle to the repository, the binary files become weird.

The default dev bundle package is larger than it needs to be also as it includes both uncompressed and compressed versions of all files.

Describe the solution you'd like

Do not build any compressed files when building a dev bundle.

Activity

  1. mstahv commented on Mar 8, 2023

    @mstahv
    Member

    I'd propose to also combine the generated files into one, so that it wouldn't look so massive change now whenever one updates a vaadin version or fixes a typo in a javascript file.

  2. mstahv commented on Mar 8, 2023

    @mstahv
    Member

    This (and my above suggestion) would also be a major DX improvement. In my test project I removed one letter in a JS file (frontend/script.js) and now my git status looks like this:

    mstahv@MatinPikkuRakkine calling-java-from-javascript % git status
    On branch master
    Your branch is up to date with 'origin/master'.
    
    Changes not staged for commit:
      (use "git add/rm <file>..." to update what will be committed)
      (use "git restore <file>..." to discard changes in working directory)
    	modified:   frontend/script.js
    	modified:   src/main/dev-bundle/config/stats.json
    	deleted:    src/main/dev-bundle/webapp/VAADIN/build/component-picker-b2a146a3.js
    	deleted:    src/main/dev-bundle/webapp/VAADIN/build/component-picker-b2a146a3.js.br
    	deleted:    src/main/dev-bundle/webapp/VAADIN/build/generated-flow-imports-307aadcc.js
    	deleted:    src/main/dev-bundle/webapp/VAADIN/build/generated-flow-imports-307aadcc.js.br
    	deleted:    src/main/dev-bundle/webapp/VAADIN/build/indexhtml-27dcf4fe.js
    	deleted:    src/main/dev-bundle/webapp/VAADIN/build/indexhtml-27dcf4fe.js.br
    	modified:   src/main/dev-bundle/webapp/index.html
    	modified:   src/main/dev-bundle/webapp/index.html.br
    
    Untracked files:
      (use "git add <file>..." to include in what will be committed)
    	frontend/index.html
    	package-lock.json
    	package.json
    	src/main/dev-bundle/webapp/VAADIN/build/component-picker-ac625ebd.js
    	src/main/dev-bundle/webapp/VAADIN/build/component-picker-ac625ebd.js.br
    	src/main/dev-bundle/webapp/VAADIN/build/generated-flow-imports-831d1f55.js
    	src/main/dev-bundle/webapp/VAADIN/build/generated-flow-imports-831d1f55.js.br
    	src/main/dev-bundle/webapp/VAADIN/build/indexhtml-c8b67409.js
    	src/main/dev-bundle/webapp/VAADIN/build/indexhtml-c8b67409.js.br
    	tsconfig.json
    	types.d.ts
    	vite.config.ts
    	vite.generated.ts
    
    no changes added to commit (use "git add" and/or "git commit -a")
    
    
  3. added a commit that references this issue on Mar 21, 2023
    4befe77
  4. added a commit that references this issue on Mar 22, 2023
    72ba97d
  5. added 2 commits that reference this issue on Mar 22, 2023
    ccccdd7
    c9498ca
  6. vaadin-bot commented on Mar 23, 2023

    @vaadin-bot
    Collaborator

    This ticket/PR has been released with Vaadin 24.1.0.alpha1 and is also targeting the upcoming stable 24.1.0 version.

  7. vaadin-bot commented on Mar 24, 2023

    @vaadin-bot
    Collaborator

    This ticket/PR has been released with Vaadin 24.0.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions