@leofcoin/peernet 0.11.1 → 0.11.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/webpack.config.js CHANGED
@@ -1,7 +1,7 @@
1
1
  const path = require('path');
2
2
  const webpack = require('webpack');
3
- module.exports = {
4
- entry: './dist/browser/peernet.js',
3
+ module.exports = [{
4
+ entry: './src/peernet.js',
5
5
  plugins: [
6
6
  // Work around for Buffer is undefined:
7
7
  // https://github.com/webpack/changelog-v5/issues/10
@@ -10,14 +10,20 @@ module.exports = {
10
10
  }),
11
11
  new webpack.ProvidePlugin({
12
12
  process: 'process/browser',
13
+ }),
14
+ new webpack.DefinePlugin({
15
+ HTTP_IMPORT: '',
16
+ "import fetch from 'node-fetch'": ''
13
17
  })
14
18
  ],
15
19
  optimization: {
16
- minimize: false
20
+ minimize: true
17
21
  },
18
22
  resolve: {
19
23
  extensions: [ '.ts', '.js' ],
20
24
  fallback: {
25
+ fs: false,
26
+ util: false,
21
27
  "stream": require.resolve("stream-browserify"),
22
28
  "buffer": require.resolve("buffer"),
23
29
  "path": require.resolve("path-browserify"),
@@ -32,4 +38,4 @@ resolve: {
32
38
  filename: 'peernet.js',
33
39
  path: path.resolve(__dirname, 'dist', 'browser'),
34
40
  },
35
- };
41
+ }];