Skip to content

Commit

Permalink
Merge pull request storybookjs#19313 from shariqx5/migration/source-l…
Browse files Browse the repository at this point in the history
…oader-tsc

Update: source-loader lib migrated to use modern build tool
  • Loading branch information
ndelangen committed Oct 5, 2022
2 parents fc77297 + 82ec721 commit 24ee6b2
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ Object {
},
Object {
"enforce": "pre",
"loader": "CWD/lib/source-loader/dist/cjs/index.js",
"loader": "CWD/lib/source-loader/dist/index.js",
"options": Object {
"injectStoryParameters": true,
"inspectLocalDependencies": true,
Expand Down Expand Up @@ -183,7 +183,7 @@ Object {
],
"use": Array [
Object {
"loader": "CWD/lib/source-loader/dist/cjs/index.js",
"loader": "CWD/lib/source-loader/dist/index.js",
"options": undefined,
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ Object {
},
Object {
"enforce": "pre",
"loader": "CWD/lib/source-loader/dist/cjs/index.js",
"loader": "CWD/lib/source-loader/dist/index.js",
"options": Object {
"injectStoryParameters": true,
"inspectLocalDependencies": true,
Expand Down Expand Up @@ -182,7 +182,7 @@ Object {
],
"use": Array [
Object {
"loader": "CWD/lib/source-loader/dist/cjs/index.js",
"loader": "CWD/lib/source-loader/dist/index.js",
"options": undefined,
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ Object {
},
Object {
"enforce": "pre",
"loader": "CWD/lib/source-loader/dist/cjs/index.js",
"loader": "CWD/lib/source-loader/dist/index.js",
"options": Object {
"injectStoryParameters": true,
"inspectLocalDependencies": true,
Expand All @@ -199,7 +199,7 @@ Object {
],
"use": Array [
Object {
"loader": "CWD/lib/source-loader/dist/cjs/index.js",
"loader": "CWD/lib/source-loader/dist/index.js",
"options": undefined,
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ Object {
},
Object {
"enforce": "pre",
"loader": "CWD/lib/source-loader/dist/cjs/index.js",
"loader": "CWD/lib/source-loader/dist/index.js",
"options": Object {
"injectStoryParameters": true,
"inspectLocalDependencies": true,
Expand All @@ -198,7 +198,7 @@ Object {
],
"use": Array [
Object {
"loader": "CWD/lib/source-loader/dist/cjs/index.js",
"loader": "CWD/lib/source-loader/dist/index.js",
"options": undefined,
},
],
Expand Down
2 changes: 1 addition & 1 deletion code/lib/source-loader/extract-source.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// DEPRECATED
// Do not import @storybook/source-loader/extract-source directly.
// Import @storybook/source-loader instead.
module.exports = require('./dist/cjs/extract-source');
module.exports = require('./dist/extract-source');
22 changes: 18 additions & 4 deletions code/lib/source-loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,17 @@
},
"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.js",
"types": "dist/index.d.ts",
"files": [
"dist/**/*",
"README.md",
Expand All @@ -32,7 +40,7 @@
],
"scripts": {
"check": "../../../scripts/node_modules/.bin/tsc --noEmit",
"prep": "node ../../../scripts/prepare.js"
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/csf": "0.0.2--canary.0899bb7.0",
Expand All @@ -51,5 +59,11 @@
"publishConfig": {
"access": "public"
},
"bundler": {
"entries": [
"./src/index.ts"
],
"platform": "node"
},
"gitHead": "fc90fc875462421c1faa35862ac4bc436de8e75f"
}

0 comments on commit 24ee6b2

Please sign in to comment.