1.1.1 • Published 4 years ago

dn-middleware-webpack-hmr v1.1.1

Weekly downloads
2
License
MIT
Repository
-
Last release
4 years ago

dn-middleware-webpack-hmr

Webpack HMR middleware for dawn template. (Compatible with wepback 3.x)

Warning: support React only.

Features

  • Enable hot module reload (HMR)
  • Create-react-app development experience (use react-dev-utils)

Getting Started

  1. update your .dawn/pipe.yml:
dev:
  - name: webpack-hmr
  1. Mark your root component as hot-exported: (detail see react-hot-loader)
// App.js
import React from 'react'
import { hot } from 'react-hot-loader'

const App = () => <div>Hello World!</div>

export default hot(module)(App)
  1. update dependencies
$ dn update
$ dn dev

Options

Example

dev:
  - name: webpack-hmr
    port: 7777 // set dev-server listening port (default a random port)
    eslint: false // disable eslint check, default `true`
    inject:  // inject to webpack entries
      - babel-polyfill  
    template: ./assets/*.html  // html-webpack-plugin template 
    sourceMap: true // enable sourceMap, default `true`
    common:  // common dependencies chunk building
      disabled: true 
    
1.1.1

4 years ago

1.1.0

5 years ago

1.0.1

5 years ago

1.0.0-alpha.11

5 years ago

1.0.0-alpha.10

5 years ago

1.0.0-alpha.9

5 years ago

1.0.0-alpha.8

5 years ago

1.0.0-alpha.7

5 years ago

1.0.0-alpha.6

5 years ago

1.0.0-alpha.5

5 years ago

1.0.0-alpha.4

5 years ago

1.0.0-alpha.3

5 years ago

1.0.0-alpha.2

5 years ago

1.0.0-alpha.1

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago