@hippy/vue-loader
TypeScript icon, indicating that this package has built-in type declarations

3.3.2 • Public • Published

Hippy Vue Loader

This is a fork of vue-loader@15.9.8 for supporting hippy css HMR.

Add style hot reload hook and repaint API to repaint component when HMR.

How to use

This loader should be used together with hippy hmr plugin and hipp debug server, an example webpack config like this:

const HippyHMRPlugin = require('@hippy/hippy-hmr-plugin');
const VueLoaderPlugin = require('@hippy/vue-loader/lib/plugin');
const vueLoader = '@hippy/vue-loader';

module.exports = {
  devServer: {                    
    hot: true,
    devMiddleware: {
      writeToDisk: true,
    },
  },
  output: {
    filename: 'index.bundle',
    path: path.resolve('./dist/dev/'),
    globalObject: '(0, eval)("this")',
  },
  plugins: [
    new VueLoaderPlugin(),
    new HippyHMRPlugin({
      // HMR [hash].hot-update.json will fetch from this path
      hotManifestPublicPath: 'http://<your_ip_or_localhost_with_proxy>:38989/',
    }),
    // other plugin here
  ],
  module: {
    rules: [
      {
        test: /\.vue$/,
        use: [
          vueLoader,
        ],
      },
    ],
    // other loaders
  }
}

Dependents (0)

Package Sidebar

Install

npm i @hippy/vue-loader

Homepage

hippyjs.org

Weekly Downloads

9

Version

3.3.2

License

MIT

Unpacked Size

52.7 kB

Total Files

18

Last publish

Collaborators

  • raypro
  • zealotchen
  • xuqingkuang
  • zoomchan-cxj
  • ilikethese