UNPKG

vue-star-rate

Version:

a vue star rating component for mobile

51 lines (49 loc) 1.16 kB
const path = require('path'); const UglifyJsPlugin = require('uglifyjs-webpack-plugin'); const VueLoaderPlugin = require('vue-loader/lib/plugin'); module.exports = { entry: './src/lib/index.js', output: { filename: 'star-rating.js', path: path.join(__dirname, '/dist'), library: 'starRating', libraryTarget: 'umd', }, mode: 'production', module: { rules: [ { test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader', }, { test: /\.vue$/, exclude: /node_modules/, loader: 'vue-loader', }, { test: /\.css$/, exclude: /node_modules/, loader: ['style-loader', 'css-loader'], }, { test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, exclude: /node_modules/, loader: 'url-loader', options: { limit: 10000, }, }, { test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, exclude: /node_modules/, loader: 'url-loader', options: { limit: 10000, }, }, ], }, plugins: [new UglifyJsPlugin(), new VueLoaderPlugin()], };