Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-san-hmr

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-san-hmr

Babel plugin from San component hot module replacement

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
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

Package last updated on 16 May 2019

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc