Comments (3)
As far as I understand, Magepack is a tool meant for production builds. As such, you should only be using it in a production-mode context.
The project README does appear to be written sequentially, although actual order can vary a little. I've described the process which seems to work best for me and likely for builds in a CD pipeline in another project:
Adding relevant details here also:
composer require creativestyle/magesuite-magepack
bin/magento setup:upgrade
bin/magento config:set dev/js/enable_magepack_js_bundling 1
bin/magento config:set dev/js/enable_js_bundling 0
bin/magento config:set dev/js/minify_files 1
bin/magento config:set dev/static/sign 1
bin/magento config:set dev/js/merge_files 1
bin/magento config:set dev/js/move_script_to_bottom 1
bin/magento config:set dev/css/merge_css_files 1
bin/magento config:set dev/css/minify_files 0
bin/magento config:set dev/css/use_css_critical_path 1
bin/magento config:set dev/template/minify_html 1
bin/magento cache:enable
bin/magento deploy:mode:set production
magepack generate --cms-url="…
magepack bundle
This deviates from the order of the Magepack README a bit, but works nonetheless. Some of my settings here are different from what you may use.
from magepack.
Yes, some documentation is needed.
For example, the bundles are created in pub/static/content
That will be deleted after a bin/magento setup:upgrade, so it must run after that.
So magepack must run directly on the production server after setup:upgrade and setup:static-content:deploy?
from magepack.
You can run the magepack generate command on your magento host or on any system to generate the magepack.config.js file. I copied this file to my magento root folder.
After installing the patches, magepack magento module and doing bin/magento s:up I enabled it with bin/magento config:set dev/js/enable_magepack_js_bundling 1 and then did
- bin/magento setup:static-content:deploy --force
- magepack bundle
- bin/magento c:c
I guess I would need to do these three steps after any changes or upgrades that clear static content. I have tested this in both dev and production modes.
The results with pagespeed are very impressive so far.
from magepack.
Related Issues (20)
- How to generate config file before each deployment
- bundlingConfig.forEach is not a function Getting issue HOT 1
- Error javascript after bundling process HOT 10
- Terser Minify-Error: Unexpected token: punc (.) HOT 8
- cms pages allows generate zero items HOT 1
- Module suddenly stopped working HOT 2
- Magento 2.4.5 issues HOT 28
- Issue with JS after update to 2.11.0 HOT 5
- Version 2.11.0 causing error in require.min.js HOT 1
- Issue with JS after update to 2.11.2 HOT 1
- SQL insert issues when reindex is trigger by cron HOT 1
- Vimeo js configs aren't being generated properly HOT 1
- [email protected]: < 18.1.0 is no longer supported HOT 4
- Generate doesn't work with ARM/Graviton server HOT 1
- bundle-common.js and page specific bundle-*.js is loaded 2 times on the page load HOT 5
- "JS_Parse_Error [SyntaxError]: Unterminated string constant" In moment.js During Bundle HOT 1
- Could not find Chrome (ver. 115.0.5790.98) HOT 1
- Bump puppeteer version from ^2.1.1 to latest HOT 1
- Does it makes sense to use magepack for PWA Studio?
- Javascript error on 2.11.2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from magepack.