1. @kodesign/ko-babel-app
ko babel presets
@kodesign/ko-babel-app
Package: @kodesign/ko-babel-app
Created by: dtux-kangaroo
Last modified: Wed, 06 Apr 2022 00:05:42 GMT
Version: 8.0.1
License: ISC
Downloads: 7
Repository: https://github.com/dtux-kangaroo/ko-resouce/tree/master/react-resource/blocks/about

Install

npm install @kodesign/ko-babel-app
yarn add @kodesign/ko-babel-app

ko-babel-app

npm version
Downloads
node version

 babel预设集合,支持react,typescript,antd动态引入

Installation

 $ npm install ko-babel-app --dev.

$ yarn add  ko-babel-app --dev.

Usage

Syntax

 const koBabelApp = require('ko-babel-app');
const babelConf = koBabelApp([, plugins], [, targets]);
  • plugins

    babel plugins will be added in config

  • targets

    the environments you support/target for your project.
    Default targets is defaults. Checkout the available options

Then use babelConf in babel loader as below

 {
  test: /\.(js|jsx|mjs)$/,
  exclude: /node_modules/,
  loader: BABEL_LOADER,
  options: deepAssign({}, babelConf, {
  cacheDirectory: true
  })
}

Tips

1.可配合 ko-script 使用;

2.可单独配置 webpack 中使用,省去安装各种 babel;

Dependencies

RELATED POST

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin