1 Star 0 Fork 0

上善若水/webpack打包 组件库

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
webpack.config.js 1.26 KB
一键复制 编辑 原始数据 按行查看 历史
zhangdawei 提交于 2021-12-01 11:35 +08:00 . chore: webpack配置
const path = require('path');
const VueLoaderPlugin = require('vue-loader/lib/plugin');
const {CleanWebpackPlugin} = require('clean-webpack-plugin');
module.exports = {
mode:'development',
entry:'./src/index.js',
output:{
path:path.resolve(__dirname,'./dist'),
publicPath:'/dist/',
filename:'vue-el-table.js',
library:'vue-el-table',
libraryTarget:'umd',
libraryExport:'default',
umdNamedDefine:true,
globalObject:'typeof self !== \'undefined\' ? self : this'
},
module:{
rules:[{
test:/\.vue$/,
loader:'vue-loader'
},{
test:/\.css$/,
loader:'css-loader'
},{
test:/\.less$/,
loader:'style-loader!css-loader!less-loader'
},
{
test: /\.(png|jpg|gif|eot|woff|ttf|svg|webp|PNG)(\?\S*)?$/,
use: ["file-loader"],
},]
},
devtool:'source-map',
resolve:{
alias:{
'vue':'vue/dist/vue.js',
'@':path.join(__dirname, 'src')
}
},
plugins:[
new VueLoaderPlugin(),
new CleanWebpackPlugin()
],
// 排除打包库
externals: {
vue: 'Vue',
'element-ui': 'ELEMENT'
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/ssrss_admin/webpack.git
git@gitee.com:ssrss_admin/webpack.git
ssrss_admin
webpack
webpack打包 组件库
master

搜索帮助