Socket
Socket
Sign inDemoInstall

build-plugin-check-esmodule

Package Overview
Dependencies
0
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    build-plugin-check-esmodule

检查snpm包是否支持esmodule


Version published
Maintainers
1
Created

Readme

Source

一、安装使用

1、下载依赖

   snpm i build-plugin-check-esmodule --save-dev

2、在build.json文件中使用该插件

  "plugins": [
    +[
    +  "build-plugin-check-esmodule",
    +  ["@babel/*", "react"]
    +],
    ...
  ]

3、参数规则类型是Array

  • 如: @babel/* 则表示检测@babe下所有的包
  • 如:react 则表示只检测react这个包

二、使用注意

  • 在使用了该插件后,在本地开发中如果检测到某个snpm包不支持esmodule,则会进行警告处理,如下图
  • 如果发布到生产检测到某个snpm包不支持esmodule,则会中断打包

Keywords

FAQs

Last updated on 13 Mar 2023

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