1 | const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
|
2 |
|
3 | module.exports = {
|
4 | entry: require.resolve('.'),
|
5 | output: {
|
6 | filename: 'browser.js',
|
7 | library: 'Snekfetch',
|
8 | libraryTarget: 'umd',
|
9 | },
|
10 | plugins: [
|
11 | new UglifyJSPlugin(),
|
12 | ],
|
13 | module: {
|
14 | rules: [
|
15 | {
|
16 | test: require.resolve('./package.json'),
|
17 | use: {
|
18 | loader: 'json-filter-loader',
|
19 | options: {
|
20 | used: ['version', 'homepage'],
|
21 | },
|
22 | },
|
23 | },
|
24 | ],
|
25 | },
|
26 | resolve: {
|
27 | alias: {
|
28 | querystring: require.resolve('./src/qs_mock'),
|
29 | },
|
30 | },
|
31 | };
|