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

base shouldn't be conditional #608

Closed
ericclemmons opened this issue Jan 29, 2019 · 2 comments
Closed

base shouldn't be conditional #608

ericclemmons opened this issue Jan 29, 2019 · 2 comments

Comments

@ericclemmons
Copy link

Bug Report

base only affects the public path in production, where it should exist in all environments (especially when using Docz behind a proxy in a larger app!)

Describe the bug

https://github.com/pedronauck/docz/blob/daa1c89b5b033e323df06c18c40e7ac50aaad3bd/packages/docz-core/src/webpack/config.ts#L25

To Reproduce

  1. Set doczrc.js to contain:
export default {
  base: '/docz/'
}
  1. yarn docz dev
  2. Notice how assets are still http://localhost:3000/static/js/app.js, and not prefixed by /docz/.

Expected behavior

I expected /docz/ to be consistent across all environments.

If people want it disabled in development, doczrc.js can contain:

export default {
  base: process.env.NODE_ENV === "production" ? "/docz/" : null
}

Environment

node -e "var os=require('os');console.log('Node.js ' + process.version + '\n' + os.platform() + ' ' + os.release())"
npm --version

Node.js v10.13.0
darwin 18.2.0
6.4.1
@ericclemmons
Copy link
Author

I can PR this if it's acceptable!

@ericclemmons
Copy link
Author

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

No branches or pull requests

2 participants