How to rewrite code to include files with dynamic path
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 9.8k
- Forks
- 326
- PR merge metrics
- No merged PRs in 30d
Description
I'm trying to use glob.sync with path.resolve with no luck.
Is there anything I can change to get this working?
The files I'm trying to get working need to be bundled as they're part of the app.
const path = require('path');
const glob = require('glob');
const files = glob.sync(path.resolve(`${__dirname}/*.js`));
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the shown glob.sync(path.resolve(...)) example with ncc, using the __dirname and dynamic *.js path from the issue. Trace how ncc handles the glob result and bundled files, then define done as a documented or reproducible resolution for including those files.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100