0

I'd like to activate the core JS aggregation but I am having an error in the console when I do it:

Uncaught SyntaxError: invalid property id

The error is triggered from [email protected] which is declared as a custom library component

dataviz_utils:
  version: 1.
  js:
    ../../../../../libraries/dompurify/dist/purify.min.js: { }
    assets/js/lib/[email protected]: { }
    assets/js/lib/[email protected]: { }
    assets/js/lib/d3-zoom.v1.min.js: { }
    assets/js/lib/[email protected]: { }
    assets/js/lib/[email protected]: { }
    assets/js/lib/[email protected]: { }
    assets/js/dataviz.utils.js: { }
  css:
    theme:
      assets/css/[email protected]: { }
  dependencies:
    - core/drupal
    - core/drupalSettings
    - core/jquery

I have no error when the aggregation is turned off. Everything works as expected.

I checked the dependencies, it looks good.

I am wondering what could cause that error... If anyone has a clue, feel free to share it

1 Answer 1

4

You should mark already-minified files with minified: true in the options object. If aggregation is problematic for a library, also add preprocess: false.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.