Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding more complex files to static breaks the build #940

Closed
daKmoR opened this issue Sep 3, 2018 · 2 comments · Fixed by #953
Closed

Adding more complex files to static breaks the build #940

daKmoR opened this issue Sep 3, 2018 · 2 comments · Fixed by #953

Comments

@daKmoR
Copy link

daKmoR commented Sep 3, 2018

🐛 Bug Report

Adding more complex "folder content" to static breaks the build.

Have you read the Contributing Guidelines on issues?

yes

To Reproduce

  1. checkout a storybook app
  2. generate a static version of storybook
  3. put that folder in assets/*

Expected behavior

demos folder will be part of the build folder

Actual Behavior

build breaks

.../example-vanilla/website$ npm run build

> @ build /.../example-vanilla/website
> docusaurus-build

generate.js triggered...
feed.js triggered...
feed.js triggered...
sitemap.js triggered...
ReferenceError: window is not defined
    at Object.<anonymous> (/.../example-vanilla/website/node_modules/docusaurus/lib/pages/demos/static/tempiframe.b1f78240f6a2a447f3d2.bundle.js:1:1)
    at Module._compile (internal/modules/cjs/loader.js:689:30)

Reproducible Demo

git clone git@github.com:daKmoR/example-docusaurus-bug.git
cd example-docusaurus-bug
cd website
npm run build

Additional info

$ npm --version
6.2.0
$ node --version
v10.9.0
$ yarn --version
1.9.4

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.3 LTS
Release:        16.04
Codename:       xenial

System: Windows 10 on WSL Ubuntu
@daKmoR daKmoR changed the title Adding more complex files to assets breaks the build Adding more complex files to static breaks the build Sep 4, 2018
@daKmoR
Copy link
Author

daKmoR commented Sep 11, 2018

for now I'm doing a manual merge afterwards...

e.g. I run docusauruns and storybook build separately and then have an additional step afterwards to merge and publish them...

it's a good enough workaround for me... still a pitty it doesn't work out of the box

PS: feel free to close it if you think it's something docusaurus should/will not support

@endiliey
Copy link
Contributor

endiliey commented Sep 11, 2018

Hey @daKmoR,

Sorry, I missed this.

I think this is related to #525.
Nested folder named "static" inside static files folder causes build error

Same issue using storybook, but that issue didn't have any reproducible issue. So we'll use this issue instead.

The error that I got was different though from what is told in this issue. It's similar to #525
image

P.S: This will work on v2 (we will post a blog about it soon).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants