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

Add support for setting base directories of assets #4450

Closed
wants to merge 1 commit into from
Closed

Add support for setting base directories of assets #4450

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented May 12, 2018

Sometimes, we need to deploy our code on lousy service provider. The service provider supports flat directory only, rather than hierarchical directory.

In above case, building code with create-react-app predefined hierarchical directory make us agonizing.

Service prodivder supports:

├── asset-manifest.json
├── favicon.ico
├── index.html
├── manifest.json
├── service-worker.js
├── main.f58a13b4.css
├── main.f58a13b4.css.map
├── main.1a92a0e5.js
└── main.1a92a0e5.js.map

But creact-react-app outputs:

├── asset-manifest.json
├── favicon.ico
├── index.html
├── manifest.json
├── service-worker.js
└── static
    ├── css
    │   ├── main.f58a13b4.css
    │   └── main.f58a13b4.css.map
    ├── js
        ├── main.1a92a0e5.js
        └── main.1a92a0e5.js.map

So I opened a PR to make setting base directories of assets possible.

This PR does simple things:

  • export 3 configurable environment variables: CSS_DIR / JS_DIR / MEDIA_DIR
  • configure output path with above 3 environment variables.

If I should do some other things to make it merged, please comment. 😺

@kaka2507
Copy link

I would like to use this feature for flexible customize. Vote!

@ianschmitz ianschmitz mentioned this pull request Aug 3, 2018
@stale
Copy link

stale bot commented Nov 2, 2018

This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed in 7 days if no further activity occurs.

@stale stale bot added the stale label Nov 2, 2018
@ghost ghost closed this Nov 3, 2018
@lock lock bot locked and limited conversation to collaborators Jan 18, 2019
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants