Giter VIP home page Giter VIP logo

Comments (3)

vbuck avatar vbuck commented on August 18, 2024 4

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.

elfeffe avatar elfeffe commented on August 18, 2024

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.

gaiterjones avatar gaiterjones commented on August 18, 2024

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.

screenshot_02

from magepack.

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.