govau / design-system-components

🛠 Component code and tests for the Australian Government design system
https://auds.service.gov.au
MIT License
739 stars 111 forks source link

'unsafe-eval' for strict CSP policy headers #933

Closed kozillla closed 3 years ago

kozillla commented 4 years ago

Hi Guys,

I am trying to use the animate package on the website where I'm setting up Content Security Policy headers, sadly it fails due to 'unsafe-eval' check.

It is caused by : https://github.com/govau/design-system-components/blob/cc5cb0e693b4350061159bdbc15252d99c34aa42/packages/animate/src/js/module.js#L343

Is it any reason why eval is used here? It would be a minor change to exports.default = AU
I am happy to create PR if require.

gordjw commented 3 years ago

Thanks for reporting @kozillla, change appears logical and tests are passing. Will push this into production asap.