scratch-storage 2.1.0 → 2.2.1

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,5 +1,4 @@
1
1
  const path = require('path');
2
- const {ProvidePlugin} = require('webpack');
3
2
  const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
4
3
 
5
4
  const base = {
@@ -14,9 +13,16 @@ const base = {
14
13
  test: /\.js$/,
15
14
  loader: 'babel-loader',
16
15
  options: {
16
+ plugins: [
17
+ '@babel/plugin-transform-runtime'
18
+ ],
17
19
  presets: [
18
20
  ['@babel/preset-env', {targets: {browsers: ['last 3 versions', 'Safari >= 8', 'iOS >= 8']}}]
19
- ]
21
+ ],
22
+ // Consider a file a "module" if import/export statements are present, or else consider it a
23
+ // "script". Fixes "Cannot assign to read only property 'exports'" when using
24
+ // @babel/plugin-transform-runtime with CommonJS files.
25
+ sourceType: 'unambiguous'
20
26
  }
21
27
  }
22
28
  ]
@@ -65,11 +71,6 @@ module.exports = [
65
71
  'js-md5': true,
66
72
  'localforage': true,
67
73
  'text-encoding': true
68
- },
69
- plugins: [
70
- new ProvidePlugin({
71
- fetch: ['node-fetch', 'default']
72
- })
73
- ]
74
+ }
74
75
  })
75
76
  ];