Skip to content

sku@10.3.0

Choose a tag to compare

@seek-oss-ci seek-oss-ci released this 07 May 01:15
· 912 commits to master since this release
c74e83a

Minor Changes

  • Remove usage of assert in production (#503)

    If you use Node's assert library or its browser port, your assertions will now be automatically removed in production via babel-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-src directive (#502)

    See the Content Security Policy section of the sku docs for setup instructions.