Questions tagged [minify]
Minification is the practice of removing unnecessary characters from code to reduce its size, thus improving load times.
2,416
questions
1
vote
1
answer
27
views
Regex to Match Two Strings Including Anything in Between Without Line-Breaks
I want to replace all the .png extensions in my HTML to .webp
so I am doing the regex expressing to match the png links:
\.\/assets\/images\/.*\.png
This works ok if my HTML file has line breaks like ...
0
votes
0
answers
21
views
Why can I no longer minify my Javascript files?
I am using VS Code to maintain a Javascript library I created and I used Google Closure Compiler (CC) to minify the js file. I have made some changes to the original code but although CC executes ...
0
votes
0
answers
35
views
vite: use "keep-names" esbuild flag for production build
one of our third party libraries requires us to preserve specific function names. in webpack we did that with terser.keep_fnames. esbuild has https://esbuild.github.io/api/#keep-names so we'd like to ...
0
votes
0
answers
16
views
How do I add a pre-deploy hook to minify Javascript code inside a public folder?
I have a React app, which has a public folder. Inside it, I have a Webworker.js file which contains code that I have written.
As it is inside public, it is served as is. I would like the code to be ...
0
votes
0
answers
16
views
JSqueeze changing double quotes to single quotes and causing problem
I am trying to use JSqueeze to minify some javascript and I can see that Github owner has now marked the code as readonly (and therefore (?) will not support raising Issues), but I am running into a ...
0
votes
1
answer
19
views
Class not found on Release Build
So I have a multi module project, with App Module implement from feature module and not implementing model module. Everything works fine on Debug Build but not on Release Build with Minify Enabled on ...
0
votes
0
answers
14
views
Grunt - Minifiying hundreds of JS files in a specific order
My current project is setup into 3 main JS files.
1.js (contains jquery, bootstrap etc) around 15 js files
2.js (contains other addons like recaptcha, SAP stuff etc) around 20 files
3.js (contains ...
0
votes
0
answers
35
views
GCC Minification not working in AEM for ECMASCRIPT_2020
We are using AEM version 6.5.9
and our js processor config was
min:gcc;languageIn=ECMASCRIPT_2018;obfuscate=true
It works for normal cases but in case we have any optional chaining(e.g. adventurer....
0
votes
0
answers
29
views
Is there an option to minify CSS and JS in PhpStorm only if minified file already exists?
On Visual Studio Code, there is an option to trigger the minify extension only if the minified file already exists (extension JS & CSS Minifier).
But in PhpStorm I couldn't find something like ...
0
votes
0
answers
39
views
Eleventy / Nunjucks: minify JS with terser within minified HTML
I try to minify partial HTML in which I minify some JS using terser (using a jsmin filter as showed in 11ty docs):
<!doctype html>
<html lang="fr"><head><meta charset=&...
0
votes
0
answers
34
views
Rodrigo54 minify_css causing problems with quotes
Trying to implement a the css minifier Rodrigo54 from github and this works pretty well** - except I notice that it's corrupting some of my grid-template-areas which need quotes around the area names.
...
0
votes
0
answers
15
views
React.js files are minified and I cant make frontend changes
I have got web app which is built using laravel and react.js ; I need to change something in frontend but found that all react files are minified in app.js file, so changing frontend files does not ...
0
votes
1
answer
21
views
Disable background:url(...) encoding as base64 in Minify package
I use minify to minimize my js and css files. But after minimizing the files, the ones which contain background:url(...) become larger, because the url is encoded to base64.
I want to turn off this ...
0
votes
0
answers
65
views
Is there an Updated Replacement for or Alternative to Microsoft.AspNet.Web.Optimization (System.Web.Optimization)?
In my .cshtml file, I have the following:
@Scripts.Render("~/js/all")
I am seeing errors like this when I click the link that corresponds to the code, above, on my page:
/* Minification ...
0
votes
0
answers
71
views
minify/optimization wont change function names angular 12
I am currently working on my main project for work and just found out that my prod-build's only minify's the .js content but it doenst changes function or class names.
All my class names and all my ...
0
votes
1
answer
34
views
PhpStorm CSSO File Watcher: Error after save
I've installed CSS minifier as the official PhpStorm documentation suggests, but this error occurred:
cmd.exe /D /C call C:\Users\douglas\AppData\Roaming\npm\csso.cmd -i styles-rca.css -o styles-rca....
1
vote
1
answer
198
views
How to detect development vs production mode in React at runtime
Is there any way in React to tell what environment I am in at runtime without exposing all my process.env variables to the client?
Webpack allows me to expose environment variables to the client, ...
0
votes
1
answer
149
views
Unity Asset Bundles Google Play Asset Delivery - Proguard Minification
I am having problems configuring Proguard to prevent minification of java libraries in the Google Play Asset Bundles and Asset Delivery Plugins when building a .aab using the Google Android App Bundle ...
0
votes
0
answers
28
views
React app - npm module - error within file within static folder
I am working on a react app which uses a certain npm module. When I run the app, an error is being produced. If I look in the sources tab in the dev tools and hover over the index.js file where the ...
0
votes
0
answers
90
views
resource file can't keep when build apk using flutter
I want to keep an image file when flutter builds APK, but no matter how many methods I have tried, the image is still compressed. Here are the methods I have tried:
enter image description here
add ...
0
votes
0
answers
51
views
React-Native JSX code to minify using terser
I am using terser to minify React-native code but I cannot seem to find the appropriate options needed to minify React-native code and so I am getting the error "Unexpected token operator (<)&...
0
votes
0
answers
13
views
Nifi Processors stopped working in the cluster
I encountered a weird situation, While in our nifi cluster environment (3node cluster) was working and we have around 14 nifi flows, everything was working fine but suddenly in our nifi cluster ...
0
votes
0
answers
17
views
Whats the use of Bundlers?
Sorry for a broad question, but i am currently trying to understand bundlers, e.g. webpack and what a development workflow looks like.
Can bundlers like webpack export only the js classes i have used ...
0
votes
1
answer
398
views
How to minimize "very long vector path" in android vector drawable files
How to minimize very long vector path in vector drawable files using avocado optimizer tool.
I have tried using svg editor, but vector path is still long, so it's getting warnings as very long vector ...
0
votes
1
answer
57
views
Minimize Mysql Json output
Mysql has a JSON_PRETTY() function to print human-readable JSON. I'm looking for the opposite functionality, to minimize JSON columns, getting rid of unnecessary whitespace, but haven't been able to ...
-1
votes
1
answer
61
views
Visual Studio Code auto sftp generated files like .min.css
I have a problem with Visual Studio Code. I am using less files so added extensions to auto generate .css and other to make .min.css files. The problem is "ftp-simple" and "sftp" ...
0
votes
1
answer
72
views
How to mangle function names used in event attributes with html-minifier-terser?
I am using the latest https://github.com/terser/html-minifier-terser 7.0.0 (https://www.npmjs.com/package/html-minifier-terser)
The readme states
Minify JavaScript in script elements and event ...
0
votes
0
answers
24
views
Minified Javascript returning different result than in console
When I run the following Javascript, when it's minified:
console.log(prefix);
var inputs = $('input').filter(function () {
return this.id.match(new RegExp(`${prefix}_\\d+`));
});
console.log('...
0
votes
2
answers
407
views
Missing class com.facebook.infer.annotation.Nullsafe$Mode (referenced from: com.facebook.ads.NativeAdBase
I updated my android studio to "Android Studio Dolphin | 2021.3.1" now I have problems in some projects:
Missing classes detected while running R8. Please add the missing classes or apply ...
0
votes
1
answer
24
views
Does JS minifiers treat object names properties independently of object and their usage contexts?
Am I right saying that the following rule works for any/almost-any JS minifier: The property names of all objects of your program are treated as a single set of strings which have no relation to the ...
1
vote
0
answers
77
views
Grunt-terser failing to minify React JSX code on Sails
I am using browserify with babelify to transpile React code from ES6 and everything went smoothly until trying to minify using Uglify and discovered that Uglify doesn't do ES6 syntax, so I switched to ...
0
votes
2
answers
43
views
ExtJS - How to disabled minification of specific file
I have an external library file (auth0.js) I need to include in the build but not minify it as it's already minified.
"js": [
{
"path": "app.js",
...
0
votes
0
answers
13
views
Failed to visualize plots after minification with terser or uglifyjs
I have an app written in javascript. I have an .html file that calls a bunch of javascripts under "js" directory. I tried two different minify algorithms A) uglifyjs and B) terser on all the ...
0
votes
1
answer
55
views
How minify javascript function receiving PHP Arrays?
I have a javascript function receiving php arrays like this :
let options = <?php echo $arrayoptions; ?>;
let optlibs = <?php echo $arrayoptlib; ?>;
let forms = <?php echo $arrayforms;...
-1
votes
1
answer
237
views
Minify/uglify html page with embedded script tags in a nodejs app
I have an express app that, among other things, delivers some html code based on a single handlebars template.
It would be great for the use-case to deliver it with short latency. So I read and ...
0
votes
1
answer
35
views
Webpack config CSSminify create JS file
I'm trying to explore webpack on purpose to minify my JS and SCSS file.
On purpose to do that I use CSSMinimizer and TerserPlugin for webback
module.exports = {
entry: {
style:'./asset/...
0
votes
0
answers
197
views
NextJS javascript minification
I have few scripts in public folder and added in _document.tsx like so
import { Html, Head, Main, NextScript } from 'next/document';
import Script from 'next/script';
export default function Document(...
1
vote
1
answer
252
views
MUI V5, how to minify class names in production build
How is possible to there is no option to minify the prod class names? It is a a big step back. Please say me that I am not right.
In Material v4 can be achieved with 3 simple rules:
Only one theme ...
0
votes
0
answers
50
views
How to auto minify SCSS file after it is compiled to CSS - Shopify?
I'm trying to auto-minify the CSS file after it was compiled from SCSS in Shopify, but I don't know how to do that.
I've tried to minify the SCSS which I know is not a very clever thing to do because ...
0
votes
0
answers
125
views
Beautify minified inline javascript code in chrome?
I'm trying to add some features to a third-party chrome addon that injects code into an existing website. This code is inline (i.e. not an external javascript file) and is minified. I want to insert ...
0
votes
1
answer
33
views
uglifycss changes background color when minified
When I run the script to minify my css file using uglifycss the background color changes in the minified file. What can i do to make sure this doesn't happen?
filename.css:
{....
background: #bfaaaff
....
0
votes
1
answer
265
views
AWS Serverless: minify/uglify the sam build lambda output
I have a few AWS Lambda functions with APIGateway. I'm using the serverless approach, packing and deploying the app using SAM CLI. It outputs the separate function built inside the .aws-sam directory ...
0
votes
0
answers
173
views
Vue 2: Minify JS files using Terser
I want to compress my js files using Terser Plugin.
Here is my dependencies
"dependencies": {
"axios": "^0.26.0",
"core-js": "^3.6.5",
&...
0
votes
0
answers
148
views
PhpStorm SCSS fails to build with file watcher
I have been using the same settings for few years now and today after trying to change some SCSS code I got this ERROR:
/usr/local/lib/node_modules/sass/sass.js --no-cache --update main.scss:../../...
0
votes
0
answers
37
views
Pagespeed. Minify css in <style amp-custom>
I need to minify inside tag <style amp-custom>
All documentation describe only cases <style> or
<div style="background-image:url('images/Puzzle.jpg.pagespeed.ic.7X5cYtoCx-.jpg');&...
1
vote
1
answer
183
views
WebCompiler extension for Visual Studio adding undesired code to minified JS scripts
I have a .NET MVC application, for which I use the (2022 version of the) WebCompiler extension for Visual Studio 2022, in order to minify my CSS et JS files.
When the JS scripts get minified, it seems ...
0
votes
1
answer
198
views
Minifying JS & CSS in Stencil Utils - BigCommerce
I'm looking for a way to compress the JavaScript and CSS files on a BigCommerce site that is using a Stencil-Utils theme. Other CMS I've used have tools built-in but this one seems to be a bit more ...
0
votes
0
answers
126
views
ListSFTP - FetchSFTP - PutSFTP process sometime skip new files
I have a process flow like ListSFTP - FetchSFTP - PutSFTP,which has Listing Strategy : Tracking Timestamps, which some times skip one or two latest files.
To pick the missed file, i used to change ...
2
votes
1
answer
243
views
Undo from enable minify after release the app
At some point of devlopment I changed minifyEnabled to true without any rules in proguard then release the app to google play with v.1.4.0.
many of bugs occured to uses when updated the app, I knew ...
-1
votes
2
answers
1k
views
VueJS: How to minify a file in /public
Our Setup
I have a large-ish VueJS 2 project that I build and deploy via the standard npm run build to an Azure AppService.
We recently added a way for customers to integrate some functionality into ...