Storybook: storysource addon: source of transpiled files

Created on 23 Apr 2019  路  6Comments  路  Source: storybookjs/storybook

Is your feature request related to a problem? Please describe.
In my project I have to operate on transpiled (from TS to es6) *.stories.js files. They include source maps. Example:

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const react_1 = require("@storybook/react");
react_1.storiesOf("Foo", module).add("test", () => React.createElement("div", null, "Foo"));
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRm9vLnN0b3JpZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvU3RhdHVzTGFiZWwvX19kb2NzX18vRm9vLnN0b3JpZXMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHFEQUErQjtBQUMvQiw0Q0FBNkM7QUFFN0MsaUJBQVMsQ0FBQyxLQUFLLEVBQUUsTUFBTSxDQUFDLENBQUMsR0FBRyxDQUFDLE1BQU0sRUFBRSxHQUFHLEVBQUUsQ0FBQyx1Q0FBYyxDQUFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgKiBhcyBSZWFjdCBmcm9tIFwicmVhY3RcIjtcbmltcG9ydCB7IHN0b3JpZXNPZiB9IGZyb20gXCJAc3Rvcnlib29rL3JlYWN0XCI7XG5cbnN0b3JpZXNPZihcIkZvb1wiLCBtb2R1bGUpLmFkZChcInRlc3RcIiwgKCkgPT4gPGRpdj5Gb288L2Rpdj4pO1xuIl19

Describe the solution you'd like
It would be great if storysource addon would support that kind of files. Currently it seems not recognize it and shows

1 loading source...

message.
After debugging I noticed that loader is returning at line 11:
https://github.com/storybooks/storybook/blob/next/addons/storysource/src/loader/index.js#L11

Describe alternatives you've considered
No alternatives considered.

Are you able to assist bring the feature to reality?
I can try.

Additional context
Tagging @igor-dv as author of this plugin. Maybe you have some ideas/tips/workarounds how to achieve that?

storysource feature request inactive

Most helpful comment

Working on storysource V2, you will see the original source code of the story PLUS the local dependencies too.

All 6 comments

Working on storysource V2, you will see the original source code of the story PLUS the local dependencies too.

@libetl do you have any estimation when storysource v2 will be released?

Hi @wonskarol hopefully in 6.0 but not sure.
I don't have an ETA and help is more than appreciated.

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

arunoda picture arunoda  路  3Comments

ZigGreen picture ZigGreen  路  3Comments

purplecones picture purplecones  路  3Comments

levithomason picture levithomason  路  3Comments

xogeny picture xogeny  路  3Comments