@storybook/builder-webpack5 6.4.0-rc.0 → 6.4.0-rc.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.
@@ -16,7 +16,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
16
16
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
17
17
 
18
18
  async function createDefaultWebpackConfig(storybookBaseConfig, options) {
19
- var _storybookBaseConfig$;
19
+ var _options, _storybookBaseConfig$;
20
20
 
21
21
  if (options.presetsList.some(function (preset) {
22
22
  return /@storybook(\/|\\)preset-create-react-app/.test(typeof preset === 'string' ? preset : preset.name);
@@ -49,6 +49,12 @@ async function createDefaultWebpackConfig(storybookBaseConfig, options) {
49
49
  }
50
50
 
51
51
  var isProd = storybookBaseConfig.mode !== 'development';
52
+ var coreOptions = await options.presets.apply('core');
53
+ var cacheConfig = (_options = coreOptions.builder.options) !== null && _options !== void 0 && _options.fsCache ? {
54
+ cache: {
55
+ type: 'filesystem'
56
+ }
57
+ } : {};
52
58
  return _objectSpread(_objectSpread({}, storybookBaseConfig), {}, {
53
59
  module: _objectSpread(_objectSpread({}, storybookBaseConfig.module), {}, {
54
60
  rules: [...storybookBaseConfig.module.rules, cssLoaders, {
@@ -76,5 +82,5 @@ async function createDefaultWebpackConfig(storybookBaseConfig, options) {
76
82
  assert: false
77
83
  })
78
84
  })
79
- });
85
+ }, cacheConfig);
80
86
  }
@@ -181,7 +181,9 @@ var _default = async function _default(options) {
181
181
  }
182
182
  }), new _webpack.DefinePlugin(_objectSpread(_objectSpread({}, (0, _coreCommon.stringifyProcessEnvs)(envs)), {}, {
183
183
  NODE_ENV: JSON.stringify(process.env.NODE_ENV)
184
- })), isProd ? null : new _WatchMissingNodeModulesPlugin.default(_coreCommon.nodeModulesPaths), isProd ? null : new _webpack.HotModuleReplacementPlugin(), new _caseSensitivePathsWebpackPlugin.default(), quiet ? null : new _webpack.ProgressPlugin({}), shouldCheckTs ? new _forkTsCheckerWebpackPlugin.default(tsCheckOptions) : null].filter(Boolean),
184
+ })), new _webpack.ProvidePlugin({
185
+ process: 'process/browser'
186
+ }), isProd ? null : new _WatchMissingNodeModulesPlugin.default(_coreCommon.nodeModulesPaths), isProd ? null : new _webpack.HotModuleReplacementPlugin(), new _caseSensitivePathsWebpackPlugin.default(), quiet ? null : new _webpack.ProgressPlugin({}), shouldCheckTs ? new _forkTsCheckerWebpackPlugin.default(tsCheckOptions) : null].filter(Boolean),
185
187
  module: {
186
188
  rules: [babelLoader, (0, _coreCommon.es6Transpiler)(), {
187
189
  test: /\.md$/,
@@ -7,7 +7,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
7
7
  import "core-js/modules/es.promise.js";
8
8
  import { logger } from '@storybook/node-logger';
9
9
  export async function createDefaultWebpackConfig(storybookBaseConfig, options) {
10
- var _storybookBaseConfig$;
10
+ var _options, _storybookBaseConfig$;
11
11
 
12
12
  if (options.presetsList.some(function (preset) {
13
13
  return /@storybook(\/|\\)preset-create-react-app/.test(typeof preset === 'string' ? preset : preset.name);
@@ -39,6 +39,12 @@ export async function createDefaultWebpackConfig(storybookBaseConfig, options) {
39
39
  }
40
40
 
41
41
  var isProd = storybookBaseConfig.mode !== 'development';
42
+ var coreOptions = await options.presets.apply('core');
43
+ var cacheConfig = (_options = coreOptions.builder.options) !== null && _options !== void 0 && _options.fsCache ? {
44
+ cache: {
45
+ type: 'filesystem'
46
+ }
47
+ } : {};
42
48
  return _objectSpread(_objectSpread({}, storybookBaseConfig), {}, {
43
49
  module: _objectSpread(_objectSpread({}, storybookBaseConfig.module), {}, {
44
50
  rules: [...storybookBaseConfig.module.rules, cssLoaders, {
@@ -66,5 +72,5 @@ export async function createDefaultWebpackConfig(storybookBaseConfig, options) {
66
72
  assert: false
67
73
  })
68
74
  })
69
- });
75
+ }, cacheConfig);
70
76
  }
@@ -7,7 +7,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
7
7
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
8
8
 
9
9
  import path from 'path';
10
- import { DefinePlugin, HotModuleReplacementPlugin, ProgressPlugin } from 'webpack';
10
+ import { DefinePlugin, HotModuleReplacementPlugin, ProgressPlugin, ProvidePlugin } from 'webpack';
11
11
  import HtmlWebpackPlugin from 'html-webpack-plugin';
12
12
  import CaseSensitivePathsPlugin from 'case-sensitive-paths-webpack-plugin';
13
13
  import WatchMissingNodeModulesPlugin from 'react-dev-utils/WatchMissingNodeModulesPlugin';
@@ -154,7 +154,9 @@ export default (async function (options) {
154
154
  }
155
155
  }), new DefinePlugin(_objectSpread(_objectSpread({}, stringifyProcessEnvs(envs)), {}, {
156
156
  NODE_ENV: JSON.stringify(process.env.NODE_ENV)
157
- })), isProd ? null : new WatchMissingNodeModulesPlugin(nodeModulesPaths), isProd ? null : new HotModuleReplacementPlugin(), new CaseSensitivePathsPlugin(), quiet ? null : new ProgressPlugin({}), shouldCheckTs ? new ForkTsCheckerWebpackPlugin(tsCheckOptions) : null].filter(Boolean),
157
+ })), new ProvidePlugin({
158
+ process: 'process/browser'
159
+ }), isProd ? null : new WatchMissingNodeModulesPlugin(nodeModulesPaths), isProd ? null : new HotModuleReplacementPlugin(), new CaseSensitivePathsPlugin(), quiet ? null : new ProgressPlugin({}), shouldCheckTs ? new ForkTsCheckerWebpackPlugin(tsCheckOptions) : null].filter(Boolean),
158
160
  module: {
159
161
  rules: [babelLoader, es6Transpiler(), {
160
162
  test: /\.md$/,
@@ -7,7 +7,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
7
7
  import "core-js/modules/es.promise.js";
8
8
  import { logger } from '@storybook/node-logger';
9
9
  export async function createDefaultWebpackConfig(storybookBaseConfig, options) {
10
- var _storybookBaseConfig$;
10
+ var _options, _storybookBaseConfig$;
11
11
 
12
12
  if (options.presetsList.some(function (preset) {
13
13
  return /@storybook(\/|\\)preset-create-react-app/.test(typeof preset === 'string' ? preset : preset.name);
@@ -39,6 +39,12 @@ export async function createDefaultWebpackConfig(storybookBaseConfig, options) {
39
39
  }
40
40
 
41
41
  var isProd = storybookBaseConfig.mode !== 'development';
42
+ var coreOptions = await options.presets.apply('core');
43
+ var cacheConfig = (_options = coreOptions.builder.options) !== null && _options !== void 0 && _options.fsCache ? {
44
+ cache: {
45
+ type: 'filesystem'
46
+ }
47
+ } : {};
42
48
  return _objectSpread(_objectSpread({}, storybookBaseConfig), {}, {
43
49
  module: _objectSpread(_objectSpread({}, storybookBaseConfig.module), {}, {
44
50
  rules: [...storybookBaseConfig.module.rules, cssLoaders, {
@@ -66,5 +72,5 @@ export async function createDefaultWebpackConfig(storybookBaseConfig, options) {
66
72
  assert: false
67
73
  })
68
74
  })
69
- });
75
+ }, cacheConfig);
70
76
  }
@@ -7,7 +7,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
7
7
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
8
8
 
9
9
  import path from 'path';
10
- import { DefinePlugin, HotModuleReplacementPlugin, ProgressPlugin } from 'webpack';
10
+ import { DefinePlugin, HotModuleReplacementPlugin, ProgressPlugin, ProvidePlugin } from 'webpack';
11
11
  import HtmlWebpackPlugin from 'html-webpack-plugin';
12
12
  import CaseSensitivePathsPlugin from 'case-sensitive-paths-webpack-plugin';
13
13
  import WatchMissingNodeModulesPlugin from 'react-dev-utils/WatchMissingNodeModulesPlugin';
@@ -154,7 +154,9 @@ export default (async function (options) {
154
154
  }
155
155
  }), new DefinePlugin(_objectSpread(_objectSpread({}, stringifyProcessEnvs(envs)), {}, {
156
156
  NODE_ENV: JSON.stringify(process.env.NODE_ENV)
157
- })), isProd ? null : new WatchMissingNodeModulesPlugin(nodeModulesPaths), isProd ? null : new HotModuleReplacementPlugin(), new CaseSensitivePathsPlugin(), quiet ? null : new ProgressPlugin({}), shouldCheckTs ? new ForkTsCheckerWebpackPlugin(tsCheckOptions) : null].filter(Boolean),
157
+ })), new ProvidePlugin({
158
+ process: 'process/browser'
159
+ }), isProd ? null : new WatchMissingNodeModulesPlugin(nodeModulesPaths), isProd ? null : new HotModuleReplacementPlugin(), new CaseSensitivePathsPlugin(), quiet ? null : new ProgressPlugin({}), shouldCheckTs ? new ForkTsCheckerWebpackPlugin(tsCheckOptions) : null].filter(Boolean),
158
160
  module: {
159
161
  rules: [babelLoader, es6Transpiler(), {
160
162
  test: /\.md$/,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/builder-webpack5",
3
- "version": "6.4.0-rc.0",
3
+ "version": "6.4.0-rc.4",
4
4
  "description": "Storybook framework-agnostic API",
5
5
  "keywords": [
6
6
  "storybook"
@@ -60,21 +60,21 @@
60
60
  "@babel/preset-env": "^7.12.11",
61
61
  "@babel/preset-react": "^7.12.10",
62
62
  "@babel/preset-typescript": "^7.12.7",
63
- "@storybook/addons": "6.4.0-rc.0",
64
- "@storybook/api": "6.4.0-rc.0",
65
- "@storybook/channel-postmessage": "6.4.0-rc.0",
66
- "@storybook/channels": "6.4.0-rc.0",
67
- "@storybook/client-api": "6.4.0-rc.0",
68
- "@storybook/client-logger": "6.4.0-rc.0",
69
- "@storybook/components": "6.4.0-rc.0",
70
- "@storybook/core-common": "6.4.0-rc.0",
71
- "@storybook/core-events": "6.4.0-rc.0",
72
- "@storybook/node-logger": "6.4.0-rc.0",
73
- "@storybook/preview-web": "6.4.0-rc.0",
74
- "@storybook/router": "6.4.0-rc.0",
63
+ "@storybook/addons": "6.4.0-rc.4",
64
+ "@storybook/api": "6.4.0-rc.4",
65
+ "@storybook/channel-postmessage": "6.4.0-rc.4",
66
+ "@storybook/channels": "6.4.0-rc.4",
67
+ "@storybook/client-api": "6.4.0-rc.4",
68
+ "@storybook/client-logger": "6.4.0-rc.4",
69
+ "@storybook/components": "6.4.0-rc.4",
70
+ "@storybook/core-common": "6.4.0-rc.4",
71
+ "@storybook/core-events": "6.4.0-rc.4",
72
+ "@storybook/node-logger": "6.4.0-rc.4",
73
+ "@storybook/preview-web": "6.4.0-rc.4",
74
+ "@storybook/router": "6.4.0-rc.4",
75
75
  "@storybook/semver": "^7.3.2",
76
- "@storybook/store": "6.4.0-rc.0",
77
- "@storybook/theming": "6.4.0-rc.0",
76
+ "@storybook/store": "6.4.0-rc.4",
77
+ "@storybook/theming": "6.4.0-rc.4",
78
78
  "@types/node": "^14.0.10",
79
79
  "babel-loader": "^8.0.0",
80
80
  "babel-plugin-macros": "^3.0.1",
@@ -117,6 +117,6 @@
117
117
  "publishConfig": {
118
118
  "access": "public"
119
119
  },
120
- "gitHead": "812e75b32c7fe222b872961a83c05cc8ece36a36",
120
+ "gitHead": "43653ad69c8c10840e3f35a831ed8bd36b9c90dd",
121
121
  "sbmodern": "dist/modern/index.js"
122
122
  }