Skip to content

Instantly share code, notes, and snippets.

@zgordon
Created February 20, 2018 19:49
Show Gist options
  • Save zgordon/63bcad0420fbfb99cf3152456b302b77 to your computer and use it in GitHub Desktop.
Save zgordon/63bcad0420fbfb99cf3152456b302b77 to your computer and use it in GitHub Desktop.
Example of how to import files using webpack external aliases
// Example of how to deconstruct registerBlockType without externals
const { registerBlockType } = wp.blocks;
// Example of how to import wp.blocks using webpack externals
import { registerBlockType } from "@wordpress/blocks";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment