@shopify/argo-webpack-hot-client
A custom webpack-hot-client implementation that works in the web worker environment of an Argo extension
Last updated 4 months ago by shopify-dep .
MIT · Original npm · Tarball · package.json
$ cnpm install @shopify/argo-webpack-hot-client 
SYNC missed versions from official npm registry.

@shopify/argo-webpack-hot-client

This package provides utilities for automatically reloading an Argo script when content changes. The tools provided are similar to webpack-hot-client, but supports being run in a web worker and using the self.shopify API for "full" reloads.

Installation

$ yarn add @shopify/argo-webpack-hot-client --dev

Usage

You’ll reference two parts of this package in your webpack configuration:

  • Include the @shopify/argo-webpack-hot-client/worker file in an array of files for the entry config.
  • Import the ArgoHotClient plugin and include it in your webpack configuration. This plugin should not be used in production builds. It also includes webpack’s HotModuleReplacementPlugin automatically, so do not include it manually in your configuration.
import {ArgoHotClient} from '@shopify/argo-webpack-hot-client';

export function createWebpackConfig() {
  return {
    // Rest of config...
    entry: [
      // Make sure this entry appears first!
      '@shopify/argo-webpack-hot-client/worker',
      // Other entries
      'app/index',
    ],
    plugins: [
      // The order of your webpack plugins usually doesn’t matter
      new ArgoHotClient(),
    ],
  };
}

Current Tags

  • 0.1.1                                ...           latest (4 months ago)

4 Versions

  • 0.1.1                                ...           4 months ago
  • 0.1.0                                ...           4 months ago
  • 0.0.2                                ...           5 months ago
  • 0.0.1                                ...           5 months ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (1)

Copyright 2014 - 2016 © taobao.org |