source: node_modules/fast-json-patch/webpack.config.js

main
Last change on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 1.4 KB
Line 
1var webpack = require('webpack');
2const package = require('./package.json');
3const path = require('path');
4
5module.exports = env => {
6 if(env && env.NODE_ENV === "test") {
7 return [
8 {
9 entry: './test/spec/webpack/importSpec.src.js',
10 mode: 'production',
11 output: {
12 path: path.resolve(__dirname, 'test/spec/webpack'),
13 filename: 'importSpec.build.js'
14 },
15 target: 'node',
16 resolve: {
17 extensions: ['.js']
18 }
19 }
20 ];
21 }
22 else {
23 return [
24 {
25 entry: './index.js',
26 mode: 'production',
27 optimization: {
28 minimize: false
29 },
30 output: {
31 filename: 'fast-json-patch.js',
32 library: 'jsonpatch',
33 libraryTarget: 'var'
34 },
35 resolve: {
36 extensions: ['.js']
37 },
38 plugins: [
39 new webpack.BannerPlugin('fast-json-patch, version: ' + package['version'])
40 ]
41 },
42 {
43 entry: './index.js',
44 mode: 'production',
45 output: {
46 filename: 'fast-json-patch.min.js',
47 library: 'jsonpatch',
48 libraryTarget: 'var'
49 },
50 resolve: {
51 extensions: ['.js']
52 },
53 plugins: [
54 new webpack.BannerPlugin('fast-json-patch, version: ' + package['version'])
55 ]
56 }
57 ];
58 }
59};
60
61
62
63
Note: See TracBrowser for help on using the repository browser.