New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@ysfe/polyfill-webpack-plugin

Package Overview
Dependencies
Maintainers
5
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ysfe/polyfill-webpack-plugin

解决 vue-cli5 忽略node_modules 编译导致的如:globalThis 未解析问题(vivo低版本)

latest
npmnpm
Version
1.0.1
Version published
Maintainers
5
Created
Source

@ysfe/polyfill-webpack-plugin

解决 vue-cli5 忽略 node_modules 编译导致的如:globalThis 未解析问题(vivo 低版本)

前置依赖

  • node >= 8.0.0
  • webpack 5.x

使用方式

以下结合 vue 应用场景, 整理使用文档

  • 安装: 执行 yarn add @ysfe/polyfill-webpack-plugin --dev 安装插件

  • 使用:

    • vue.config.js 中, 引用插件.
       const PolyfillWebpackPlugin = require('@ysfe/polyfill-webpack-plugin').default
    
       // 通过 configureWebpack 配置
       module.exports = {
           configureWebpack: {
               plugins: [
                  new PolyfillWebpackPlugin(),
                  // other plugins ...
               ]
           }
       }
    
       // or 通过 chainWebpack 配置
    
       module.exports = {
          chainWebpack: (config) => {
             // add plugin
             config
                .plugin('PolyfillWebpackPlugin')
                .use(PolyfillWebpackPlugin)
          }
       }
    

Keywords

globalthis

FAQs

Package last updated on 27 Aug 2021

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