aframe-super-hot-html-loader
Webpack loader for hot reloading A-Frame HTML.
Last updated 8 months ago by ngokevin .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install aframe-super-hot-html-loader 
SYNC missed versions from official npm registry.

aframe-super-hot-loader

Webpack loaders for enabling Hot Module Replacement on A-Frame HTML, components, and shaders.

Live reload A-Frame, components, and shaders. Never refresh the page during development again!

Watch Video

Usage

npm install --save aframe-super-hot-loader
npm install --save aframe-super-hot-html-loader

There are two separate Webpack loaders, one for JS and one for HTML. In your Webpack config:

module.exports = {
  // ...
  module: {
    rules: [
      {
        test: /\.js/,
        exclude: /(node_modules)/,
        use: ['aframe-super-hot-loader']
      },
      {
        test: /\.html/,
        exclude: /(node_modules)/,
        use: ['aframe-super-hot-html-loader']
      }
    ]
  }
  // ...
}

Then run webpack-dev-server with hot enabled:

webpack-dev-server --hot --inline

or in your Webpack config:

module.exports = {
  devServer: {
    hot: true
  }
};

Example

There's a boilerplate example in the examples/ directory:

cd examples
npm install
npm run start

Then try it out by modifying files. If you'd like to incorporate into your own project, you can start from that boilerplate base and / or absorb the Webpack configuration.

Current Tags

  • 2.1.0                                ...           latest (8 months ago)

6 Versions

  • 2.1.0                                ...           8 months ago
  • 2.0.0                                ...           a year ago
  • 1.2.0                                ...           a year ago
  • 1.1.0                                ...           a year ago
  • 1.0.1                                ...           a year ago
  • 1.0.0                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 7
Dependencies (2)
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |