Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ndelangen committed Jun 29, 2022
1 parent 4b11506 commit 37dd381
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 13 deletions.
23 changes: 18 additions & 5 deletions lib/blocks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,25 @@
},
"license": "MIT",
"sideEffects": false,
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"types": "dist/types/index.d.ts",
"exports": {
".": {
"require": "./dist/index.js",
"import": "./dist/index.mjs",
"types": "./dist/index.d.ts"
},
"./package.json": "./package.json"
},
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"files": [
"dist/**/*",
"README.md",
"*.js",
"*.d.ts"
],
"scripts": {
"prepare": "node ../../scripts/prepare.js"
"prepare": "esrun ../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@mdx-js/react": "^1.6.22",
Expand All @@ -53,16 +61,21 @@
"memoizerific": "^1.11.3",
"polished": "^4.2.2",
"react-colorful": "^5.1.2",
"regenerator-runtime": "^0.13.7",
"ts-dedent": "^2.0.0",
"util-deprecate": "^1.0.2"
},
"devDependencies": {
"@digitak/esrun": "^3.2.2"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
},
"publishConfig": {
"access": "public"
},
"bundlerEntrypoint": [
"./src/index.ts"
],
"gitHead": "b2e85f3599c043815b18bbfc5ca563bf1c6e4add"
}
1 change: 1 addition & 0 deletions lib/manager-webpack5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"@storybook/theming": "7.0.0-alpha.7",
"@storybook/ui": "7.0.0-alpha.7",
"@types/node": "^14.0.10 || ^16.0.0",
"assert": "^2.0.0",
"babel-loader": "^8.2.5",
"case-sensitive-paths-webpack-plugin": "^2.4.0",
"chalk": "^4.1.0",
Expand Down
11 changes: 11 additions & 0 deletions lib/manager-webpack5/src/presets/manager-preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,16 @@ export async function managerWebpack(
].filter(Boolean),
module: {
rules: [
{
test: /\.m?js$/,
type: 'javascript/auto',
},
{
test: /\.m?js$/,
resolve: {
fullySpecified: false,
},
},
customManagerRuntimeLoader(),
{
test: /\.css$/,
Expand Down Expand Up @@ -159,6 +169,7 @@ export async function managerWebpack(
modules: ['node_modules'].concat(envs.NODE_PATH || []),
mainFields: ['browser', 'module', 'main'].filter(Boolean),
alias: uiPaths,
fallback: { assert: require.resolve('assert/') },
},
recordsPath: resolvePathInStorybookCache('public/records.json'),
performance: {
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@
"@typescript-eslint/eslint-plugin": "^5.15.0",
"@typescript-eslint/experimental-utils": "^5.20.0",
"@typescript-eslint/parser": "^5.15.0",
"assert": "^2.0.0",
"babel-core": "^7.0.0-bridge.0",
"babel-eslint": "^10.1.0",
"babel-jest": "^26.6.3",
Expand Down
5 changes: 0 additions & 5 deletions scripts/build-manager-config/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,4 @@ module.exports = {
builder: '@storybook/builder-webpack5',
disableTelemetry: true,
},
managerWebpack: async (config) => {
// eslint-disable-next-line no-param-reassign
config.resolve.fallback = { assert: require.resolve('assert/') };
return config;
},
};
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7780,6 +7780,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@storybook/blocks@workspace:lib/blocks"
dependencies:
"@digitak/esrun": ^3.2.2
"@mdx-js/react": ^1.6.22
"@storybook/addons": 7.0.0-alpha.7
"@storybook/api": 7.0.0-alpha.7
Expand All @@ -7800,7 +7801,6 @@ __metadata:
memoizerific: ^1.11.3
polished: ^4.2.2
react-colorful: ^5.1.2
regenerator-runtime: ^0.13.7
ts-dedent: ^2.0.0
util-deprecate: ^1.0.2
peerDependencies:
Expand Down Expand Up @@ -8727,6 +8727,7 @@ __metadata:
"@types/terser-webpack-plugin": ^5.2.0
"@types/webpack-dev-middleware": ^5.3.0
"@types/webpack-virtual-modules": ^0.1.1
assert: ^2.0.0
babel-loader: ^8.2.5
case-sensitive-paths-webpack-plugin: ^2.4.0
chalk: ^4.1.0
Expand Down Expand Up @@ -9323,7 +9324,6 @@ __metadata:
"@typescript-eslint/eslint-plugin": ^5.15.0
"@typescript-eslint/experimental-utils": ^5.20.0
"@typescript-eslint/parser": ^5.15.0
assert: ^2.0.0
babel-core: ^7.0.0-bridge.0
babel-eslint: ^10.1.0
babel-jest: ^26.6.3
Expand Down

0 comments on commit 37dd381

Please sign in to comment.