README
IcePanel Webpack
This is the preferred method of building IcePanel plugins.
Installation
First install the icepanel webpack package into your project.
npm install @icepanel/webpack --save-dev
# or
yarn add -D @icepanel/webpack
Configuration
Include the following configuration in the webpack.config.js
for your project.
const { IcePackPlugin, IcePackLiveReload, externals } = require('@icepanel/webpack')
module.exports = {
//...
plugins: [
// build an .icepack package
new IcePackPlugin({
definition: 'icepack.yml'
}),
// install the package on a local IcePanel instance
new IcePackLiveReload({
host: 'https://localhost:3001'
})
],
// stops unnecessary dependencies from being bundled with the plugin
externals: [externals()],
//...
}
Usage
Create an IcePack build using Webpack.
npx webpack
Create an IcePack build and watch for changes using live reload.
npx webpack --watch
Live Reload Authentication
To authenticate the live reload plugin with an IcePanel instance you must create a .icepanel-webpackrc
file at the root of your project containing both sessionId
and sessionSecret
.
sessionId=...
sessionSecret=...
Recommended Packages
We recommend using the following toolset for IcePanel development as demonstrated in the official plugins repository.