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

若不使用easywebpack,而只使用egg-view-react-ssr该如何配置呢? #4

Closed
beyondouyuan opened this issue May 2, 2019 · 3 comments

Comments

@beyondouyuan
Copy link

请问,若不使用easywebpack,而只使用egg-view-react-ssr该怎样配置呢?

我在egg的项目里引入了egg-view-react-ssr,并开启插件后,然后自己配置webpack环境,却总是提示can't inject of undefined,若不使用easywebpack,配置webpack的思路大概是怎样的呢

@hubcarl
Copy link
Collaborator

hubcarl commented May 8, 2019

@beyondouyuan 需要存在 config/manifest.json 文件, 格式见:https://www.yuque.com/easy-team/easywebpack/deps

// ${app_root}/config/manifest.json
{
    "app/app.js": "/public/js/app/app.2cf6dfd1.js",
    "app/app.css": "/public/css/app/app.cda9bc64.css",
    "common.js": "/public/js/common.b59f7169.js",
    "common.css": "/public/css/common.cda9bc64.css",
    "deps": {
        "app/app.js": {
        "js": [
            "/public/js/vendor.337ab787.js",
            "/public/js/common.b59f7169.js",
            "/public/js/app/app.2cf6dfd1.js"
        ],
        "css": [
            "/public/css/common.cda9bc64.css",
            "/public/css/app/app.cda9bc64.css"
        ]
    }
}

@beyondouyuan
Copy link
Author

@hubcarl thanks

@hubcarl
Copy link
Collaborator

hubcarl commented Jul 30, 2019

@beyondouyuan 目前版本 manifest.json 非必须

@hubcarl hubcarl closed this as completed Jul 30, 2019
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