Skip to content

Commit

Permalink
updated logging based on feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
donaldpipowitch committed Nov 10, 2019
1 parent 01ca395 commit e4ab56d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/source-loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
},
"dependencies": {
"@storybook/addons": "5.3.0-alpha.42",
"@storybook/node-logger": "5.3.0-alpha.42",
"@storybook/router": "5.3.0-alpha.42",
"core-js": "^3.0.1",
"estraverse": "^4.2.0",
Expand Down
5 changes: 3 additions & 2 deletions lib/source-loader/src/client/preview.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import addons from '@storybook/addons';
import { logger } from '@storybook/node-logger';
import { STORY_EVENT_ID } from './events';

const getLocation = (context, locationsMap) => locationsMap[context.id];
Expand All @@ -14,10 +15,10 @@ function sendEvent(
idsToFrameworks
) {
if (!context || !context.id || !context.kind || !context.story) {
console.warn(
logger.warn(
'@storybook/source-loader was applied to a file which does not contain a story. Please check your webpack configuration and make sure to apply @storybook/source-loader only to files containg stories. Related file:'
);
console.warn(source);
logger.warn(source);
return;
}

Expand Down

0 comments on commit e4ab56d

Please sign in to comment.