niemenjoki / compress-create-react-app Goto Github PK
View Code? Open in Web Editor NEWAn NPM package which allows easily adding post build compression to a create-react-app with minimal configuration
License: Other
An NPM package which allows easily adding post build compression to a create-react-app with minimal configuration
License: Other
npm run build results in
'compress-cra' is not recognized as an internal or external command, operable program or batch file.
There seems to be a error after compressing files when retainUncompressedFiles
is set to false. Without this option, the br compression runs as usual and the only difference is that it stores original webp files
[compress-create-react-app]:
Compressing build files...
node:fs:1538
handleErrorFromBinding(ctx);
^
Error: ENOENT: no such file or directory, stat '/home/hostname/02repos/weatherts/build/index.html'
at Object.statSync (node:fs:1538:3)
at /home/hostname/02repos/weatherts/node_modules/compress-create-react-app/src/getCombinedSize.js:6:21
at Array.forEach (<anonymous>)
at getCombinedSize (/home/hostname/02repos/weatherts/node_modules/compress-create-react-app/src/getCombinedSize.js:5:16)
at printResult (/home/hostname/02repos/weatherts/node_modules/compress-create-react-app/src/printResult.js:6:28)
at /home/hostname/02repos/weatherts/node_modules/compress-create-react-app/src/index.js:21:5 {
errno: -2,
syscall: 'stat',
code: 'ENOENT',
path: '/home/hostname/02repos/weatherts/build/index.html'
}
compress-cra.json:
{
"algorithms": ["br"],
"filetypes": [
".html",
".js",
".css",
".svg",
".png",
".jpg",
".webp",
".mp3",
".wav",
".tff",
".woff2",
".map"
],
"directory": "/build",
"retainUncompressedFiles": false
}
npm 8.19.2
node v16.14.2
thanks
I'm using a multi-package setup with lerna and yarn workspaces
As such, my build
dir is actually packages/apps/projectname/build
It would be great if you could specify that as a CLI argument
I might take a go at it
Good morning,
I hope this message finds you well. I found impressive your library and I hope to implement some functions in the create-new-startup bundler.
I was writing to formally seek your permission before I implemented a portion of your codebase. I'm only taking functions that interest me. Is there an attribution style you prefer? Thank you.
I wish we could have a compress-create-react-app.json file with configurations.
Then we could specify which files to compress, I would like to compress images, fonts, audio as well.
How much memory does compress-cra need?
Can we limit it?
If this is a fork() do we need to increase NODE parameters for forking?
New features were added with PR #7 but there are no usage instructions in the README
Hi there!
We just upgraded to the latest version (1.4.1) and we are having an issue when using the compress-cra command when building the app on a Mac. It seems that we have the same issue on Linux.
env: node\r: No such file or directory
Issue is caused by carriage return on Windows vs. mac. Have you seen this issue before?
Bram
Just for Unix-like OS-es compatibility. Right now it doesn't work on Linux and might not work on macOS as well. It returns env: node\r: No such file or directory
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.