I have a WordPress plugin that registers several custom Gutenberg Blocks.
I've seen lots of block examples that begin by impoorting various WordPress packages:
import { __ } from '@wordpress/i18n';
import { registerBlockType } from '@wordpress/blocks';
import { InnerBlocks } from '@wordpress/block-editor';
Importing the packages seems to be the recommended way to build Gutenberg Blocks.
The WordPress Package Reference says "packages are also available on npm if you want to bundle them in your code." and that all the packages are available under various wp. properties.
What are the tradeoffs between using the npm packages vs using the global variables?
I'm particularly concerned that if I use the packages I will end up with two copies of gutenberg that don't communicate.