Closed skellock closed 7 years ago
I took a run at getting this integrated, but I failed.
@rmevans9 does anything obvious pop out here on the storyshots branch?
What's happening is it doesn't seem to be loading webpack.config.js when running in jest mode.
webpack.config.js
jest
When i run the test it gives me:
Unexpected character '�' (1:0) > 1 | ����JFIFHH��@ExifMM�i�,����8Photoshop 3.08BIM8BIM%��ُ�� ���B~��,"�� | ^ 2 | ���}!1AQa"q2��#B��R��$3br� 3 | %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������� 4 | ���w!1AQaq"2B���� #3R�br�
It looks like it's tripping up on the const dogImage = require('./fun-dog.jpg') line. That strikes me as a webpack loader not loading the image.
const dogImage = require('./fun-dog.jpg')
I tried to bring in url-loader and file-loader to fix it, but didn't seem to work. It only broke storybook as it currently works in the app.
url-loader
file-loader
storybook
I then realized that, in jest mode, it's not even loading that webpack config. You can verify by putting a syntax error in that file.
I went looking in @storybook/addon-storyshots, but there's literally no files to debug in there. ha!
@storybook/addon-storyshots
We're using fuse-box to bundle, but that doesn't seem to bother storybook?
fuse-box
I'm probably doing something stupid, but I've burned more hours than I'm prepared to admit.
=)
Any insights?
Here's what he said:
I took a run at getting this integrated, but I failed.
@rmevans9 does anything obvious pop out here on the storyshots branch?
What's happening is it doesn't seem to be loading
webpack.config.js
when running injest
mode.When i run the test it gives me:
It looks like it's tripping up on the
const dogImage = require('./fun-dog.jpg')
line. That strikes me as a webpack loader not loading the image.I tried to bring in
url-loader
andfile-loader
to fix it, but didn't seem to work. It only brokestorybook
as it currently works in the app.I then realized that, in
jest
mode, it's not even loading that webpack config. You can verify by putting a syntax error in that file.I went looking in
@storybook/addon-storyshots
, but there's literally no files to debug in there. ha!We're using
fuse-box
to bundle, but that doesn't seem to botherstorybook
?I'm probably doing something stupid, but I've burned more hours than I'm prepared to admit.
=)
Any insights?