Skip to content

hzfvictory/async2trycatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

async2trycatch

Install

yarn add async2trycatch -D

Usage

// webpack.config.js

module: {
    rules: [
        {
            test: /\.js$/,
            use:{
                loader:'async2trycatch',
                options:{
                }
            }
        }
    ]
}

Options

Name Type Default Description
identifier {string} "e" catch 子句中的错误对象标识符
catchCode {string} "console.error(e)" catch 子句中的代码片段
finallyCode {string} undefined finally 子句中的代码片段

About

一个loader 自动捕获async await的错误

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published