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

2.17.3 • 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
  }
}

Readme

Keywords

none

Package Sidebar

Install

npm i @hippy/vue-loader

Homepage

hippyjs.org

Weekly Downloads

39

Version

2.17.3

License

MIT

Unpacked Size

52 kB

Total Files

18

Last publish

Collaborators

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