WebDevStudios / wds-block-starter

A block starter for projects.
15 stars 3 forks source link

Replace const dependency with imports #29

Closed michealengland closed 4 years ago

michealengland commented 4 years ago

Remove const dependencies and re-add as imports that point to local packages.

Closes #28

Description

Replace const dependencies with import dependencies that point to local NPM packages present in WP Scripts for the Rich Text Demo block.

Also, I noticed that package bundle size did increase very slightly when using importing.

Note: Engineers can still determine how they include dependencies using either destructuring or importing as long as the file is present in the NPM package.

Steps to verify the solution

  1. Checkout this branch
  2. Verify that the block works after building files
  3. Check for any abnormal console entries. Your console should look like the following: Screen Shot 2020-03-25 at 3 03 46 PM

Other