sku@10.3.0
·
912 commits
to master
since this release
Minor Changes
-
Remove usage of
assertin production (#503)If you use Node's
assertlibrary or its browser port, your assertions will now be automatically removed in production viababel-plugin-unassert. This allows you to perform more expensive checks during development without worrying about the perfomance impacts on users.For example, let's assume you wrote the following code:
import React from 'react'; import assert from 'assert'; export const Rating = ({ rating }) => { assert(rating >= 0 && rating <= 5, 'Rating must be between 0 and 5'); return <div>...</div>; };
In production, the code above would be logically equivalent to this:
import React from 'react'; export const Rating = ({ rating }) => <div>...</div>;
-
Add Content Security Policy generation for the
script-srcdirective (#502)See the Content Security Policy section of the sku docs for setup instructions.