const path = require('path');const ProgressBarPlugin = require('progress-bar-webpack-plugin');const VueLoaderPlugin = require('vue-loader/lib/plugin');const config = require('./config');module.exports = {mode: 'production',entry: {app: ['./src/index.js']},output: {path: path.resolve(process.cwd(), './lib'),publicPath: '/dist/',filename: 'element-ui.common.js',chunkFilename: '[id].js',libraryExport: 'default',library: 'ELEMENT',libraryTarget: 'commonjs2'},resolve: {extensions: ['.js', '.vue', '.json'],alias: config.alias,modules: ['node_modules']},externals: config.externals,performance: {hints: false},stats: {children: false},optimization: {minimize: false},module: {rules: [{test: /\.(jsx?|babel|es6)$/,include: process.cwd(),exclude: config.jsexclude,loader: 'babel-loader'},{test: /\.vue$/,loader: 'vue-loader',options: {compilerOptions: {preserveWhitespace: false}}},{test: /\.css$/,loaders: ['style-loader', 'css-loader']},{test: /\.(svg|otf|ttf|woff2?|eot|gif|png|jpe?g)(\?\S*)?$/,loader: 'url-loader',query: {limit: 10000,name: path.posix.join('static', '[name].[hash:7].[ext]')}}]},plugins: [new ProgressBarPlugin(),new VueLoaderPlugin()]};
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。