collective / collective.nitf

A Dexterity-based content type inspired on the News Industry Text Format specification
8 stars 3 forks source link

Load Swiper with webpack and upgrade to 6.8.4 #254

Closed wesleybl closed 2 years ago

wesleybl commented 2 years ago

When the Swiper was being loaded via cdn in the html, the error was occurring:

Uncaught Error: Mismatched anonymous define() module: function(){"usestrict";return window.Swiper}

This is because of requirejs. See:

https://requirejs.org/docs/errors.html#mismatch

So it won't be possible to load Swiper by CDN.

codecov-commenter commented 2 years ago

Codecov Report

Merging #254 (1be23c3) into master (d3d648c) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #254   +/-   ##
=======================================
  Coverage   91.43%   91.43%           
=======================================
  Files          31       31           
  Lines        1296     1296           
=======================================
  Hits         1185     1185           
  Misses        111      111           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d3d648c...1be23c3. Read the comment docs.

wesleybl commented 2 years ago

@hvelarde Do you know why snyk is complaining? I don't have access to verify.

wesleybl commented 2 years ago

The problem with snyk was the Swiper version. I updated it to 6.8.4.

hvelarde commented 2 years ago

I was trying to add you to Snyk, but seems the free plan doesn't allow that.

wesleybl commented 2 years ago

I was trying to add you to Snyk, but seems the free plan doesn't allow that.

An invitation appeared for me and I accepted. I have access now. Thanks!