UNPKG

angularjs-nouislider

Version:

An AngularJS wrapper for the noUiSlider range slider with minimal overhead.

60 lines (58 loc) 1.45 kB
const path = require('path'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const { CleanWebpackPlugin } = require('clean-webpack-plugin'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin'); const TerserPlugin = require('terser-webpack-plugin'); const ESLintPlugin = require('eslint-webpack-plugin'); module.exports = { entry: './src-examples/js/examples', output: { filename: '[name].[chunkhash].js', path: path.resolve(__dirname, 'examples'), publicPath: '', }, module: { rules: [ { test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader', }, { test: /\.css$/, use: [ MiniCssExtractPlugin.loader, 'css-loader', ], }, ], }, optimization: { minimizer: [ new TerserPlugin({ cache: true, parallel: true, sourceMap: true, extractComments: true, }), new OptimizeCSSAssetsPlugin(), ], }, plugins: [ new CleanWebpackPlugin(), new MiniCssExtractPlugin({ filename: '[name].css', chunkFilename: '[id].css', }), new HtmlWebpackPlugin({ template: './src-examples/index.html', }), new ESLintPlugin(), ], devtool: 'source-map', devServer: { contentBase: ['./examples', './dist', './'], }, mode: 'production', };