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

packages/api-docs could possibly be reused for govuk-frederic #6

Open
Loque- opened this issue Jun 28, 2018 · 1 comment
Open

packages/api-docs could possibly be reused for govuk-frederic #6

Loque- opened this issue Jun 28, 2018 · 1 comment

Comments

@Loque-
Copy link
Collaborator

Loque- commented Jun 28, 2018

Issue originally opened by @taranchauhan on govuk-react, moving here as it is out of scope for the react library.

index.js in api-docs Line 15 is hardcoded to govuk-react

const components = require(‘govuk-react’);

If this was dynamic, then it would allow us to reuse it. However, dynamic variables in requires cause an issue with Webpack at build time.

Since Webpack is running in build-time, it can’t figure out which modules to bundle when the name is a dynamic variable. You can give it hints by specifying part of the path (for example, if you know all the modules are in a single directory).

This is an issue to consider.

@stevesims
Copy link
Owner

We could probably tell api-docs what package we're using via an environment variable, thus allowing it to be neutral and re-usable across both projects

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