This plugin demonstrates how webpack can be used to import external packages.
- Step 0: Before hosting the plugin, you need to build it first.
- To install the dependencies, run
npm install
on your computer. - To build the plugin, run
npm build
on your computer. If all went well, you should see adist
folder with the fileWebpackShowcase.min.js
inside.
- To install the dependencies, run
- Step 1: Host the plugin on a CORS enabled server, or upload the
dist/WebpackShowcase.min.js
file into your own space- If you are hosting the plugin on a server, you need to copy the full URL to the
WebpackShowcase.min.js
file - To host the plugin in your own space, you can go to File -> Storage and click the top-right "upload" button
- Once it has been uploaded, click on the
WebpackShowcase.min.js
file and select "Copy URL"
- If you are hosting the plugin on a server, you need to copy the full URL to the
- Step 2: Add the plugin to your space by clicking "Plugins" and scrolling to the bottom to click the "Add from URL" button. Paste the URL to the plugin here.
- Done! Now you should see a popup with a unique identifier generated by an external package.