delete-source-maps-webpack-plugin
v1.0.5
Published
删除webpack打包后的sourcemap文件
Downloads
364
Maintainers
Readme
delete-source-maps-webpack-plugin
一个 webpack 插件,用于删除项目构件之后产生的 source map 文件
install
npm install delete-source-maps-webpack-plugin --save-dev
yarn add delete-source-maps-webpack-plugin -D
webpack
// webpack.config.js
const DeleteSourceMapsWebpackPlugin = require('delete-source-maps-webpack-plugin').default
module.exports = {
devtool:'source-map',
plugins:[
new DeleteSourceMapsWebpackPlugin()
]
}
chainWebpack
import DeleteSourceMapsWebpackPlugin from 'delete-source-maps-webpack-plugin'
const chainWebpack = (config)=>{
config.devtool('source-map').end()
config.plugins('delete-source-maps-webpack-plugin').use(DeleteSourceMapsWebpackPlugin).end()
}