Socket
Socket
Sign inDemoInstall

babel-plugin-san-hmr

Package Overview
Dependencies
2
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    babel-plugin-san-hmr

Babel plugin from San component hot module replacement


Version published
Weekly downloads
1
decreased by-85.71%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

babel-plugin-san-hmr

将 JavaScript 文件的 San component 添加 HMR 功能。目前支持写法如下:

// 1.
import {Component} from 'san';
import './app.css';

export default class App extends Component {
    constructor(opts) {
        super(opts);
    }
    static template = '<h1>Hello, World~</h1>';
}
// 2.
import san from 'san';
import './app.css';

export default class App extends san.Component {
    constructor(opts) {
        super(opts);
    }
    static template = '<h1>Hello, World~</h1>';
}

使用方式

// webpack
//...
loader: require.resolve('babel-loader'),
options: {
    // ...
    plugins: [
        require('babel-plugin-san-hmr')
    ]
}

FAQs

Last updated on 27 Dec 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc