@storybook/builder-webpack5 6.4.9 → 6.5.0-alpha.12

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.
@@ -15,8 +15,6 @@ var _htmlWebpackPlugin = _interopRequireDefault(require("html-webpack-plugin"));
15
15
 
16
16
  var _caseSensitivePathsWebpackPlugin = _interopRequireDefault(require("case-sensitive-paths-webpack-plugin"));
17
17
 
18
- var _WatchMissingNodeModulesPlugin = _interopRequireDefault(require("react-dev-utils/WatchMissingNodeModulesPlugin"));
19
-
20
18
  var _terserWebpackPlugin = _interopRequireDefault(require("terser-webpack-plugin"));
21
19
 
22
20
  var _webpackVirtualModules = _interopRequireDefault(require("webpack-virtual-modules"));
@@ -55,6 +53,7 @@ var _default = async function _default(options) {
55
53
  framework = options.framework,
56
54
  frameworkPath = options.frameworkPath,
57
55
  presets = options.presets,
56
+ previewUrl = options.previewUrl,
58
57
  typescriptOptions = options.typescriptOptions,
59
58
  modern = options.modern,
60
59
  features = options.features,
@@ -161,6 +160,7 @@ var _default = async function _default(options) {
161
160
  FRAMEWORK_OPTIONS: frameworkOptions,
162
161
  CHANNEL_OPTIONS: coreOptions === null || coreOptions === void 0 ? void 0 : coreOptions.channelOptions,
163
162
  FEATURES: features,
163
+ PREVIEW_URL: previewUrl,
164
164
  STORIES: stories.map(function (specifier) {
165
165
  return _objectSpread(_objectSpread({}, specifier), {}, {
166
166
  importPathMatcher: specifier.importPathMatcher.source
@@ -183,7 +183,7 @@ var _default = async function _default(options) {
183
183
  NODE_ENV: JSON.stringify(process.env.NODE_ENV)
184
184
  })), new _webpack.ProvidePlugin({
185
185
  process: 'process/browser.js'
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),
186
+ }), isProd ? null : new _webpack.HotModuleReplacementPlugin(), new _caseSensitivePathsWebpackPlugin.default(), quiet ? null : new _webpack.ProgressPlugin({}), shouldCheckTs ? new _forkTsCheckerWebpackPlugin.default(tsCheckOptions) : null].filter(Boolean),
187
187
  module: {
188
188
  rules: [babelLoader, (0, _coreCommon.es6Transpiler)(), {
189
189
  test: /\.md$/,
@@ -5,17 +5,20 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
5
5
  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; }
6
6
 
7
7
  /* eslint-disable import/no-unresolved */
8
- import { addDecorator, addParameters, addLoader, addArgsEnhancer, addArgTypesEnhancer, setGlobalRender } from '{{clientApi}}';
9
- import { logger } from '{{clientLogger}}';
8
+ import { addDecorator, addParameters, addLoader, addArgs, addArgTypes, addArgsEnhancer, addArgTypesEnhancer, setGlobalRender } from '{{clientApi}}';
10
9
  import * as config from '{{configFilename}}';
11
10
  Object.keys(config).forEach(function (key) {
12
11
  var value = config[key];
13
12
 
14
13
  switch (key) {
15
14
  case 'args':
15
+ {
16
+ return addArgs(value);
17
+ }
18
+
16
19
  case 'argTypes':
17
20
  {
18
- return logger.warn('Invalid args/argTypes in config, ignoring.', JSON.stringify(value));
21
+ return addArgTypes(value);
19
22
  }
20
23
 
21
24
  case 'decorators':
@@ -10,12 +10,11 @@ import path from 'path';
10
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
- import WatchMissingNodeModulesPlugin from 'react-dev-utils/WatchMissingNodeModulesPlugin';
14
13
  import TerserWebpackPlugin from 'terser-webpack-plugin';
15
14
  import VirtualModulePlugin from 'webpack-virtual-modules';
16
15
  import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
17
16
  import themingPaths from '@storybook/theming/paths';
18
- import { toRequireContextString, es6Transpiler, stringifyProcessEnvs, nodeModulesPaths, handlebars, interpolate, toImportFn, normalizeStories, readTemplate, loadPreviewOrConfigFile } from '@storybook/core-common';
17
+ import { toRequireContextString, es6Transpiler, stringifyProcessEnvs, handlebars, interpolate, toImportFn, normalizeStories, readTemplate, loadPreviewOrConfigFile } from '@storybook/core-common';
19
18
  import { createBabelLoader } from './babel-loader-preview';
20
19
  import { useBaseTsSupport } from './useBaseTsSupport';
21
20
  var storybookPaths = ['addons', 'api', 'channels', 'channel-postmessage', 'components', 'core-events', 'router', 'theming', 'semver', 'client-api', 'client-logger'].reduce(function (acc, sbPackage) {
@@ -33,6 +32,7 @@ export default (async function (options) {
33
32
  framework = options.framework,
34
33
  frameworkPath = options.frameworkPath,
35
34
  presets = options.presets,
35
+ previewUrl = options.previewUrl,
36
36
  typescriptOptions = options.typescriptOptions,
37
37
  modern = options.modern,
38
38
  features = options.features,
@@ -134,6 +134,7 @@ export default (async function (options) {
134
134
  FRAMEWORK_OPTIONS: frameworkOptions,
135
135
  CHANNEL_OPTIONS: coreOptions === null || coreOptions === void 0 ? void 0 : coreOptions.channelOptions,
136
136
  FEATURES: features,
137
+ PREVIEW_URL: previewUrl,
137
138
  STORIES: stories.map(function (specifier) {
138
139
  return _objectSpread(_objectSpread({}, specifier), {}, {
139
140
  importPathMatcher: specifier.importPathMatcher.source
@@ -156,7 +157,7 @@ export default (async function (options) {
156
157
  NODE_ENV: JSON.stringify(process.env.NODE_ENV)
157
158
  })), new ProvidePlugin({
158
159
  process: 'process/browser.js'
159
- }), isProd ? null : new WatchMissingNodeModulesPlugin(nodeModulesPaths), isProd ? null : new HotModuleReplacementPlugin(), new CaseSensitivePathsPlugin(), quiet ? null : new ProgressPlugin({}), shouldCheckTs ? new ForkTsCheckerWebpackPlugin(tsCheckOptions) : null].filter(Boolean),
160
+ }), isProd ? null : new HotModuleReplacementPlugin(), new CaseSensitivePathsPlugin(), quiet ? null : new ProgressPlugin({}), shouldCheckTs ? new ForkTsCheckerWebpackPlugin(tsCheckOptions) : null].filter(Boolean),
160
161
  module: {
161
162
  rules: [babelLoader, es6Transpiler(), {
162
163
  test: /\.md$/,
@@ -5,17 +5,20 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
5
5
  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; }
6
6
 
7
7
  /* eslint-disable import/no-unresolved */
8
- import { addDecorator, addParameters, addLoader, addArgsEnhancer, addArgTypesEnhancer, setGlobalRender } from '{{clientApi}}';
9
- import { logger } from '{{clientLogger}}';
8
+ import { addDecorator, addParameters, addLoader, addArgs, addArgTypes, addArgsEnhancer, addArgTypesEnhancer, setGlobalRender } from '{{clientApi}}';
10
9
  import * as config from '{{configFilename}}';
11
10
  Object.keys(config).forEach(function (key) {
12
11
  var value = config[key];
13
12
 
14
13
  switch (key) {
15
14
  case 'args':
15
+ {
16
+ return addArgs(value);
17
+ }
18
+
16
19
  case 'argTypes':
17
20
  {
18
- return logger.warn('Invalid args/argTypes in config, ignoring.', JSON.stringify(value));
21
+ return addArgTypes(value);
19
22
  }
20
23
 
21
24
  case 'decorators':
@@ -10,12 +10,11 @@ import path from 'path';
10
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
- import WatchMissingNodeModulesPlugin from 'react-dev-utils/WatchMissingNodeModulesPlugin';
14
13
  import TerserWebpackPlugin from 'terser-webpack-plugin';
15
14
  import VirtualModulePlugin from 'webpack-virtual-modules';
16
15
  import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
17
16
  import themingPaths from '@storybook/theming/paths';
18
- import { toRequireContextString, es6Transpiler, stringifyProcessEnvs, nodeModulesPaths, handlebars, interpolate, toImportFn, normalizeStories, readTemplate, loadPreviewOrConfigFile } from '@storybook/core-common';
17
+ import { toRequireContextString, es6Transpiler, stringifyProcessEnvs, handlebars, interpolate, toImportFn, normalizeStories, readTemplate, loadPreviewOrConfigFile } from '@storybook/core-common';
19
18
  import { createBabelLoader } from './babel-loader-preview';
20
19
  import { useBaseTsSupport } from './useBaseTsSupport';
21
20
  var storybookPaths = ['addons', 'api', 'channels', 'channel-postmessage', 'components', 'core-events', 'router', 'theming', 'semver', 'client-api', 'client-logger'].reduce(function (acc, sbPackage) {
@@ -33,6 +32,7 @@ export default (async function (options) {
33
32
  framework = options.framework,
34
33
  frameworkPath = options.frameworkPath,
35
34
  presets = options.presets,
35
+ previewUrl = options.previewUrl,
36
36
  typescriptOptions = options.typescriptOptions,
37
37
  modern = options.modern,
38
38
  features = options.features,
@@ -134,6 +134,7 @@ export default (async function (options) {
134
134
  FRAMEWORK_OPTIONS: frameworkOptions,
135
135
  CHANNEL_OPTIONS: coreOptions === null || coreOptions === void 0 ? void 0 : coreOptions.channelOptions,
136
136
  FEATURES: features,
137
+ PREVIEW_URL: previewUrl,
137
138
  STORIES: stories.map(function (specifier) {
138
139
  return _objectSpread(_objectSpread({}, specifier), {}, {
139
140
  importPathMatcher: specifier.importPathMatcher.source
@@ -156,7 +157,7 @@ export default (async function (options) {
156
157
  NODE_ENV: JSON.stringify(process.env.NODE_ENV)
157
158
  })), new ProvidePlugin({
158
159
  process: 'process/browser.js'
159
- }), isProd ? null : new WatchMissingNodeModulesPlugin(nodeModulesPaths), isProd ? null : new HotModuleReplacementPlugin(), new CaseSensitivePathsPlugin(), quiet ? null : new ProgressPlugin({}), shouldCheckTs ? new ForkTsCheckerWebpackPlugin(tsCheckOptions) : null].filter(Boolean),
160
+ }), isProd ? null : new HotModuleReplacementPlugin(), new CaseSensitivePathsPlugin(), quiet ? null : new ProgressPlugin({}), shouldCheckTs ? new ForkTsCheckerWebpackPlugin(tsCheckOptions) : null].filter(Boolean),
160
161
  module: {
161
162
  rules: [babelLoader, es6Transpiler(), {
162
163
  test: /\.md$/,
@@ -5,17 +5,20 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
5
5
  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; }
6
6
 
7
7
  /* eslint-disable import/no-unresolved */
8
- import { addDecorator, addParameters, addLoader, addArgsEnhancer, addArgTypesEnhancer, setGlobalRender } from '{{clientApi}}';
9
- import { logger } from '{{clientLogger}}';
8
+ import { addDecorator, addParameters, addLoader, addArgs, addArgTypes, addArgsEnhancer, addArgTypesEnhancer, setGlobalRender } from '{{clientApi}}';
10
9
  import * as config from '{{configFilename}}';
11
10
  Object.keys(config).forEach(function (key) {
12
11
  var value = config[key];
13
12
 
14
13
  switch (key) {
15
14
  case 'args':
15
+ {
16
+ return addArgs(value);
17
+ }
18
+
16
19
  case 'argTypes':
17
20
  {
18
- return logger.warn('Invalid args/argTypes in config, ignoring.', JSON.stringify(value));
21
+ return addArgTypes(value);
19
22
  }
20
23
 
21
24
  case 'decorators':
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/builder-webpack5",
3
- "version": "6.4.9",
3
+ "version": "6.5.0-alpha.12",
4
4
  "description": "Storybook framework-agnostic API",
5
5
  "keywords": [
6
6
  "storybook"
@@ -60,22 +60,22 @@
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.9",
64
- "@storybook/api": "6.4.9",
65
- "@storybook/channel-postmessage": "6.4.9",
66
- "@storybook/channels": "6.4.9",
67
- "@storybook/client-api": "6.4.9",
68
- "@storybook/client-logger": "6.4.9",
69
- "@storybook/components": "6.4.9",
70
- "@storybook/core-common": "6.4.9",
71
- "@storybook/core-events": "6.4.9",
72
- "@storybook/node-logger": "6.4.9",
73
- "@storybook/preview-web": "6.4.9",
74
- "@storybook/router": "6.4.9",
63
+ "@storybook/addons": "6.5.0-alpha.12",
64
+ "@storybook/api": "6.5.0-alpha.12",
65
+ "@storybook/channel-postmessage": "6.5.0-alpha.12",
66
+ "@storybook/channels": "6.5.0-alpha.12",
67
+ "@storybook/client-api": "6.5.0-alpha.12",
68
+ "@storybook/client-logger": "6.5.0-alpha.12",
69
+ "@storybook/components": "6.5.0-alpha.12",
70
+ "@storybook/core-common": "6.5.0-alpha.12",
71
+ "@storybook/core-events": "6.5.0-alpha.12",
72
+ "@storybook/node-logger": "6.5.0-alpha.12",
73
+ "@storybook/preview-web": "6.5.0-alpha.12",
74
+ "@storybook/router": "6.5.0-alpha.12",
75
75
  "@storybook/semver": "^7.3.2",
76
- "@storybook/store": "6.4.9",
77
- "@storybook/theming": "6.4.9",
78
- "@types/node": "^14.0.10",
76
+ "@storybook/store": "6.5.0-alpha.12",
77
+ "@storybook/theming": "6.5.0-alpha.12",
78
+ "@types/node": "^14.0.10 || ^16.0.0",
79
79
  "babel-loader": "^8.0.0",
80
80
  "babel-plugin-macros": "^3.0.1",
81
81
  "babel-plugin-polyfill-corejs3": "^0.1.0",
@@ -87,7 +87,6 @@
87
87
  "glob-promise": "^3.4.0",
88
88
  "html-webpack-plugin": "^5.0.0",
89
89
  "path-browserify": "^1.0.1",
90
- "react-dev-utils": "^11.0.4",
91
90
  "stable": "^0.1.8",
92
91
  "style-loader": "^2.0.0",
93
92
  "terser-webpack-plugin": "^5.0.3",
@@ -100,7 +99,6 @@
100
99
  },
101
100
  "devDependencies": {
102
101
  "@types/case-sensitive-paths-webpack-plugin": "^2.1.4",
103
- "@types/react-dev-utils": "^9.0.4",
104
102
  "@types/terser-webpack-plugin": "^5.0.2",
105
103
  "@types/webpack-dev-middleware": "^4.1.0",
106
104
  "@types/webpack-hot-middleware": "^2.25.3",
@@ -118,6 +116,6 @@
118
116
  "publishConfig": {
119
117
  "access": "public"
120
118
  },
121
- "gitHead": "7d354c89322080b241454eff2cd3adf9c11306cd",
119
+ "gitHead": "e1f8050f2461859cd560fc166f2dfe9d5c478a55",
122
120
  "sbmodern": "dist/modern/index.js"
123
121
  }