Coder Social home page Coder Social logo

Comments (10)

bboydflo avatar bboydflo commented on May 26, 2024 2

I think this needs to be added asap. Please read the official blog: https://blog.chromium.org/2018/10/trustworthy-chrome-extensions-by-default.html where it among others says that minified source code is allowed but it is not allowed to obfuscate code.

UPDATE
Specifically google blog states:

Thus, minification will still be allowed, including the following techniques:

  • Removal of whitespace, newlines, code comments, and block delimiters
  • Shortening of variable and function names
  • Collapsing the number of JavaScript files

I am a bit in doubt now after reading this: https://developers.google.com/speed/docs/insights/MinifyResources

from webextension-toolbox.

bboydflo avatar bboydflo commented on May 26, 2024 1

👍 for B or D in this order.

from webextension-toolbox.

balcsida avatar balcsida commented on May 26, 2024 1

Started working on this

from webextension-toolbox.

balcsida avatar balcsida commented on May 26, 2024

IMHO I would go with the first option. I completely understand the reasons why a developer would like to achieve as small file sizes, but for my extensions, it majority of their sizes was caused by the included, unoptimized assets (e.g. icons)

from webextension-toolbox.

bboydflo avatar bboydflo commented on May 26, 2024

if that's implemented would it be possible to enable minification again?

from webextension-toolbox.

HaNdTriX avatar HaNdTriX commented on May 26, 2024

@bboydflo in solution B & D yes.

So far I know dead code elimination will be disabled as well. This might suck a projects like react, that depend heavily on dead code elimination.

from webextension-toolbox.

balcsida avatar balcsida commented on May 26, 2024

I've checked and it seems that AMO allows you to upload the un-minified version of your code separately for the manual review.
What if we generate two seperate package on webextension-toolbox build firefox, one with minified and dead code elimination, and one without it?

from webextension-toolbox.

JimMorrison723 avatar JimMorrison723 commented on May 26, 2024

I'd say go with option D.
No need to complicate things (and build a not minified version with cli flag is fine)

from webextension-toolbox.

balcsida avatar balcsida commented on May 26, 2024

Hi @bboydflo,

Thanks for bringing my attention to this and apologies for not reacting earlier on your comment.
Nowadays, I have lots of things on my plate (higher load during work, plenty of extra projects, ~3-4 hours of sleep), so I cannot guarantee anything regarding this yet.
Anyway, I added the major priority flag to indicate the importance of this.

from webextension-toolbox.

balcsida avatar balcsida commented on May 26, 2024

Hi everyone,

Thanks for your kind patience.

I made some progress on this case today, now we have a command line argument --no-minimize/-m for the build command, which disables Webpack minimize.
I manually tested it and it works as expected. Just need to add some test cases and we are good to go.

I've also discovered a bug while working on this issue.

from webextension-toolbox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.