1.0.2 • Published 2 years ago
escheck-webpack-plugin v1.0.2
escheck-webpack-plugin
📖 Introduction
Check all the webpack generated files to find whether the code match the selected ES version. If doesn't match the plugin will thorw an error and stop webpack emit files.
📦 Installation
yarn add -D escheck-webpack-plugin
🛠 Usage
// webpack.config.js
module.exports = {
plugins: [
new new ESCheck({
// type ecmaVersion = 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 'latest'
ecmaVersion: 'latest' // optional, default 'latest'
})
]
}
// vue.config.js
const ESCheck = require('escheck-webpack-plugin')
module.exports = defineConfig({
configureWebpack: (config) => {
config.plugins.push(new ESCheck(options))
},
})