Skip to content

systax error and mixins config do not work #57

@zmrdlb

Description

@zmrdlb

This issue is a:

  • Bug
  • Feature suggestion
  • Documentation issue
  • Other (Please Specify)

Description

The common bundle and a page-special bundle are in front of requirejs-config.js after building. For this situation, there are many systax errors on checkout page, and mixins config of requirejs do not work.

Possible solutions:

Requirejs configuration should be loaded and executed before other modules with AMD by reference to Requirejs API and Require Optimizer. Besides, our code depend on polyfill.js and requirejs-mixins.js and so on. So, a page-special bundle should be placed at the end of head tag.

I modified the function _prepareLayout() in Magento_BundleConfig/Block/Html/Head/Config.php. It works.

if (file_exists($pageSpecificBundleAbsPath)) {
            $assetCollection->add(
                $pageSpecificBundleRelPath,
                $bundleConfig
            );
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions