Skip to content

Currently doesn't work for production build #603

@victorb

Description

@victorb

Trying to use the newest code from webui (ea3664b) together with go-ipfs.

After installing the dependencies, I run yarn build, then add the hash to IPFS (ipfs add -r dist/) and replace the following line in go-ipfs with the root hash of the add: https://github.com/ipfs/go-ipfs/blob/0efdcadafb526ce0edce0a6ae4ca994740c7f844/core/corehttp/webui.go#L4 (then rebuild and start the newly built daemon)

After doing this, it quite doesn't work... First issue I hit was that there is a typo in the production configuration. See https://github.com/ipfs/webui/blob/ea3664bde32490c3f082696726e4f334adc27901/src/app/js/store/configure-store.prod.js#L3 Supposed to be Middleware instead of Middlware, notice the missing e.

After fixing that, things actually load but the CSS is not part of the HTML file that is loaded. See QmefLwZaGVCwRkdDMBNExWs5ahFERnyxDV7Ngnx9sgiefU

This is how the index.html ends up looking:

<!doctype html><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/></head><body><div id="root"></div><script src="ipfs-webui.0.3.0.js"></script></body>

Started to dig into how hjs-webpack works and actually injects styles but gave up at this point.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugA bug in existing code (including security flaws)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions