eggjs / eggjs/egg

Unable to change the directory structure with customLoader

Open
#4,543 0 comments 0 reactions 0 assignees View on GitHub
Inactive
Dominant language
TypeScript
Stars
19k
Forks
1.8k
PR merge metrics
No merged PRs in 30d

Description

## What happens?
I need to change the directory structure to module driven approach.

## Mini Showcase
**My Structure**
Screenshot 2020-12-12 at 1 29 50 PM
**My Config**
Screenshot 2020-12-12 at 1 31 54 PM
**My router.js**
```
const { controller } = app.blog;
router.get("/", .controller.home.index);
```
**What I Got**
`app.blog shows an empty object {}`

**Expected behavior**
controller & home object should be there to access index function.

## Context
- **Node Version**: v12.16.1
- **Egg Version**: ^2.15.1
- **Platform**: macOS Catalina 10.15.6

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.