@breathlessway/babel-plugin-external-helpers-mini

This plugin contains helper functions that’ll be placed at the top of the generated code

Usage no npm install needed!

<script type="module">
  import breathlesswayBabelPluginExternalHelpersMini from 'https://cdn.skypack.dev/@breathlessway/babel-plugin-external-helpers-mini';
</script>

README

fork from @babel/plugin-external-helpers

This plugin contains helper functions that’ll be placed at the top of the generated code

See our website @babel/plugin-external-helpers for more information.

为了解决生成的babelHelpers在小程序中undefined,将babelHelpers改成global.babelHelpers,可以自定义前缀

options:{
    helperVersion = "7.0.0-beta.0",
    whitelist = false,
    prefix='global'  // 自定义前缀
}

Install

Using npm:

npm install --save-dev @breathlessway/babel-plugin-external-helpers-mini

or using yarn:

yarn add @breathlessway/babel-plugin-external-helpers-mini --dev