@loopback/example-webpack 0.10.1 → 0.10.2

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
@@ -37,7 +37,9 @@ const nodeConfig = {
37
37
  output: {
38
38
  filename: 'bundle-node.js',
39
39
  path: path.resolve(__dirname, 'dist'),
40
- libraryTarget: 'umd', // We can use `commonjs2` for Node.js
40
+ library: {
41
+ type: 'umd', // We can use `commonjs2` for Node.js
42
+ },
41
43
  },
42
44
  };
43
45
 
@@ -46,14 +48,15 @@ const nodeConfig = {
46
48
  */
47
49
  const webConfig = {
48
50
  ...baseConfig,
49
-
50
51
  name: 'web',
51
52
  target: 'web', // For browsers
52
53
  output: {
53
54
  filename: 'bundle-web.js',
54
55
  path: path.resolve(__dirname, 'dist'),
55
- library: 'LoopBack',
56
- libraryTarget: 'umd',
56
+ library: {
57
+ name: 'LoopBack',
58
+ type: 'umd',
59
+ },
57
60
  },
58
61
  plugins: [
59
62
  new webpack.ProvidePlugin({
@@ -63,6 +66,6 @@ const webConfig = {
63
66
  ],
64
67
  };
65
68
 
66
- // Expose two configurations for `webpack`. Use `--config-name <web|node>` to
69
+ // Expose two configurations for `webpack`. Use `--config-name <node|web>` to
67
70
  // select a named entry.
68
71
  module.exports = [nodeConfig, webConfig];