@icepanel/webpack

0.3.0 • Public • Published

IcePanel Webpack

npm version npm size npm downloads github issues github prs

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @icepanel/webpack

Weekly Downloads

1

Version

0.3.0

License

MIT

Unpacked Size

16.5 kB

Total Files

5

Last publish

Collaborators

  • victor96