text: const path = require('path');
  const webpack = require('webpack');
  const { CleanWebpackPlugin } = require('clean-webpack-plugin');
  const VueLoaderPlugin = require('vue-loader/lib/plugin');
  
  module.exports = {
    mode: 'production',
    entry: './src/index.js',
    output: {
      path: path.resolve(__dirname, './dist'),
      filename: '[name].js',
      publicPath: '/dist/',
      library: 'vue-mamicplayer',
      libraryTarget: 'umd',
      globalObject: 'this'
    },
    externals: {
      vue: 'vue',
    },
    module: {
      rules: [
        {
          test: /\.vue$/,
          use: ['vue-loader'],
          include: path.resolve(__dirname, 'src'),
        },
        {
          test: /\.(js|jsx)?$/,
          use: ['babel-loader'],
          include: path.resolve(__dirname, 'src'),
        },
        {
          test: /\.css$/,
          use: ['style-loader', 'css-loader', 'postcss-loader'],
          include: path.resolve(__dirname, 'src'),
        },
        {
          test: /\.less$/,
          use: ['style-loader', 'css-loader', 'postcss-loader', 'less-loader'],
          include: path.resolve(__dirname, 'src'),
        },
        {
          test: /\.(eot|woff|otf|svg|ttf|woff2|appcache|mp3|mp4|pdf)(\?|$)/,
          include: path.resolve(__dirname, 'src'),
          use: ['file-loader?name=assets/[name].[ext]'],
        },
        {
          test: /\.(png|jpg|gif|svg)(\?|$)/,
          include: path.resolve(__dirname, 'src'),
          use: ['url-loader?limit=8192&name=assets/[name].[ext]'],
        },
      ],
    },
    plugins: [new VueLoaderPlugin(), new CleanWebpackPlugin()],
    resolve: {
      extensions: ['.js', '.vue', '.less', '.css'],
      alias: {
        '@': path.resolve(__dirname, 'src'),
      },
    },
  };
  