azu / azu/rc-config-loader

rc-config-loader doesn't view config file in current path

Open
#3 1 comment 0 reactions 0 assignees View on GitHub
Type: Question
Dominant language
TypeScript
Stars
64
Forks
7
PR merge metrics
No merged PRs in 30d

Description

Accorind sources, if I haven't options `rc-config-loader` use default path for search - current directory

```
const configFileName = opts.configFileName || `.${pkgName}rc`;
```

So I use loader without options and get `undefined`. Code available here

1. `git clone https://github.com/ravecat/mendeleev.git --single-branch --branch rc-config-loader-issue`
2. `yarn`

aTry to use in `src/common/Media/responsive/index.js`

```javascript
/* eslint-disable */
import { css } from "styled-components";

const rcfile = require("rc-config-loader");

const responsive = (property, resolution) => {
console.log(rcfile('sct'))

return css`
@media (max-width: ${resolution}px) {
${property};
}
`;
}

export default responsive;

```

Probably it's webpack settings relative with resolve options, but I use relative path, not absolute

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the report by cloning the mendeleev branch, running yarn, and trying rc-config-loader from src/common/Media/responsive/index.js. Start by checking how the loader resolves its default path and how webpack resolution affects the relative call. Done means rcfile('sct') finds the current-path config without options instead of returning undefined.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, webpack
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.