|
1 | 1 | const Path = require('path'); |
2 | 2 | const CircularDependencyPlugin = require('circular-dependency-plugin'); |
3 | 3 |
|
4 | | -module.exports = [{ |
| 4 | +module.exports = { |
5 | 5 | mode: 'production', |
6 | 6 | devtool: 'source-map', |
7 | | - target: 'node', |
8 | 7 | entry: { |
9 | 8 | index: './src/index.ts' |
10 | 9 | }, |
@@ -63,66 +62,4 @@ module.exports = [{ |
63 | 62 | resolve: { |
64 | 63 | extensions: ['.tsx', '.ts', '.js'] |
65 | 64 | } |
66 | | -}, { |
67 | | - mode: 'production', |
68 | | - devtool: 'source-map', |
69 | | - target: 'web', |
70 | | - entry: { |
71 | | - index: './src/index.ts' |
72 | | - }, |
73 | | - output: { |
74 | | - path: Path.resolve(__dirname, 'dist/umd'), |
75 | | - filename: '[name].browser.js', |
76 | | - library: '$DSJsonApiEntityProvider', |
77 | | - libraryTarget: 'umd', |
78 | | - globalObject: 'this', |
79 | | - umdNamedDefine: true |
80 | | - }, |
81 | | - externals: { |
82 | | - 'lodash': { |
83 | | - commonjs: 'lodash', |
84 | | - commonjs2: 'lodash', |
85 | | - amd: 'lodash', |
86 | | - root: '_' |
87 | | - }, |
88 | | - '@dipscope/type-manager': { |
89 | | - commonjs: '@dipscope/type-manager', |
90 | | - commonjs2: '@dipscope/type-manager', |
91 | | - amd: '@dipscope/type-manager', |
92 | | - root: '$DSTypeManager' |
93 | | - }, |
94 | | - '@dipscope/entity-store': { |
95 | | - commonjs: '@dipscope/entity-store', |
96 | | - commonjs2: '@dipscope/entity-store', |
97 | | - amd: '@dipscope/entity-store', |
98 | | - root: '$DSEntityStore' |
99 | | - } |
100 | | - }, |
101 | | - plugins: [ |
102 | | - new CircularDependencyPlugin({ |
103 | | - exclude: /node_modules/, |
104 | | - include: /src/, |
105 | | - failOnError: true, |
106 | | - allowAsyncCycles: false, |
107 | | - cwd: process.cwd() |
108 | | - }) |
109 | | - ], |
110 | | - module: { |
111 | | - rules: [{ |
112 | | - test: /\.tsx?$/, |
113 | | - use: [{ |
114 | | - loader: 'ts-loader', |
115 | | - options: { |
116 | | - configFile: 'tsconfig/tsconfig.umd.json' |
117 | | - } |
118 | | - }], |
119 | | - exclude: /node_modules/, |
120 | | - include: [ |
121 | | - Path.resolve(__dirname, 'src') |
122 | | - ], |
123 | | - }] |
124 | | - }, |
125 | | - resolve: { |
126 | | - extensions: ['.tsx', '.ts', '.js'] |
127 | | - } |
128 | | -}]; |
| 65 | +}; |
0 commit comments