UNPKG

luminati-proxy-stripped

Version:

A configurable local proxy for luminati.io

79 lines (78 loc) 2.91 kB
// LICENSE_CODE ZON ISC 'use strict'; /*jslint node:true*/ const webpack = require('webpack'); const html_webpack_plugin = require('html-webpack-plugin'); module.exports = { context: `${__dirname}/src/pub`, entry: { app: './app.js', vendor: ['jquery', 'lodash', 'moment', 'bootstrap', 'bootstrap/dist/css/bootstrap.css', 'codemirror/lib/codemirror', 'codemirror/lib/codemirror.css', 'codemirror/mode/javascript/javascript', 'react', 'react-dom', 'react-bootstrap', 'regenerator-runtime', 'es6-shim', 'animate.css'] }, output: { path: `${__dirname}/bin/pub`, publicPath: '/', filename: '[chunkhash].[name].js', }, plugins: [ new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/), new webpack.optimize.CommonsChunkPlugin({ names: ['vendor', 'runtime'], minChunks: Infinity, }), new webpack.ProvidePlugin({ $: 'jquery', jQuery: 'jquery', }), new html_webpack_plugin({inject: true, template: 'index.html'}), ], module: { rules: [ { test: /src[\\\/]pub[\\\/].+\.js$/, exclude: /node_modules/, use: ['babel-loader'], }, { test: /www[\\\/].+\.js$/, exclude: /node_modules/, use: ['hutil-loader', 'babel-loader'], }, { test: /util/, parser: {node: false, commonjs: false}, exclude: [/www[\\\/].+\.js$/, /node_modules/], use: ['hutil-loader'], }, {test: /\.css$/, use: ['style-loader', 'css-loader']}, {test: /\.less$/, use: ['style-loader', 'css-loader?-url', 'less-loader']}, {test: /\.eot(\?v=\d+.\d+.\d+)?$/, use: 'url-loader?limit=100000&name=[name].[ext]'}, {test: /\.woff2?(\?v=[0-9]\.[0-9]\.[0-9])?$/, use: 'url-loader?' +'limit=100000&mimetype=application/font-woff&' +'name=[name].[ext]'}, {test: /\.[ot]tf(\?v=\d+.\d+.\d+)?$/, use: 'url-loader?' +'limit=100000&mimetype=application/octet-stream'}, {test: /\.svg(\?v=\d+.\d+.\d+)?$/, use: 'url-loader?' +'limit=120000&mimetype=image/svg+xml&name=[name].[ext]'}, {test: /\.(jpe?g|png|ico|gif)$/, use: 'url-loader?limit=100000'}, ], }, resolve: { modules: [__dirname, 'node_modules'], alias: { '/util': 'util/', jquery: 'jquery/src/jquery.js', virt_jquery_all: 'jquery/src/jquery.js', '/www': 'www/', }, }, resolveLoader: { alias: {'hutil-loader': `${__dirname}/lib/hutil-loader.js`}, }, };