zhangyuang / ssr

A most advanced ssr framework support React17/React18/Vue2/Vue3 on Earth that implemented serverless-side render specification.
http://doc.ssr-fc.com/
MIT License
2.61k stars 284 forks source link

server-utils 里的 webpack-dev-server-ssr 依赖相较于 webpack-dev-server 修改内容的记录 #70

Closed baxtergu closed 3 years ago

baxtergu commented 3 years ago

https://github.com/ykfe/ssr/blob/a7369548cb5d47fe26078811978983c58d4c04c0/packages/webpack/src/client.ts#L5

@zhangyuang 你提的这个 PR https://github.com/webpack/webpack-dev-server/pull/1792 已经合并进 webpack-dev-server 了,没必要再用一个 fork 的版本依赖,npm 上的信息全都指向 webpack-dev-server,会造成误导。

zhangyuang commented 3 years ago

那并不可以。。。谁说我fork出来的 webpack-dev-server-ssr只改了这块

baxtergu commented 3 years ago

那并不可以。。。谁说我fork出来的 webpack-dev-server-ssr只改了这块

那能把 fork 出来的那个包在 npm 上的 readme 改一改,加个提示什么的,npm 里面的 repository 指向不对

zhangyuang commented 3 years ago

不需要加...源码我都没上传。只改了一行代码所有配置跟原来的devserver一样

发自我的iPhone

------------------ 原始邮件 ------------------ 发件人: Shengnan @.> 发送时间: 2021年6月24日 17:49 收件人: ykfe/ssr @.> 抄送: yuuang @.>, Mention @.> 主题: 回复:[ykfe/ssr] server-utils 里的依赖,可以完全替换成 webpack-dev-server (#70)

那并不可以。。。谁说我fork出来的 webpack-dev-server-ssr只改了这块

那能把 fork 出来的那个包在 npm 上的 readme 改一改,加个提示什么的,npm 里面的 repository 指向不对

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

baxtergu commented 3 years ago

不需要加...源码我都没上传。只改了一行代码所有配置跟原来的devserver一样 发自我的iPhone ------------------ 原始邮件 ------------------ 发件人: Shengnan @.> 发送时间: 2021年6月24日 17:49 收件人: ykfe/ssr @.> 抄送: yuuang @.>, Mention @.> 主题: 回复:[ykfe/ssr] server-utils 里的依赖,可以完全替换成 webpack-dev-server (#70) 那并不可以。。。谁说我fork出来的 webpack-dev-server-ssr只改了这块 那能把 fork 出来的那个包在 npm 上的 readme 改一改,加个提示什么的,npm 里面的 repository 指向不对 — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

要不在 require 那句上加个注释,大概写下改了什么?

zhangyuang commented 3 years ago

fix by 93335e85fcce4ac375909e5eb9ee77eabdf509b7

baxtergu commented 3 years ago

fix by 93335e8

Modification Details:

  // webpack-dev-server-ssr/lib/utils/status.js L22 - L49
  if (!options.disableInfo) {
    if (options.socket) {
      log.info(
        `Listening to socket at ${colors.info(useColor, options.socket)}`
      );
    } else {
      log.info(`Project is running at ${colors.info(useColor, uri)}`);
    }
  }

  if (!options.disableInfo) {
    log.info(
      `webpack output is served from ${colors.info(
        useColor,
        options.publicPath
      )}`
    );
  }
  if (!options.disableInfo) {
    if (contentBase) {
      log.info(
        `Content not from webpack is served from ${colors.info(
          useColor,
          contentBase
        )}`
      );
    }
  }
    // webpack-dev-server-ssr/lib/options.json L51 - L53
    "disableInfo": {
      "type": "boolean"
    },

对照了一下代码,记录一下,去掉默认提示的确只能魔改

zhangyuang commented 3 years ago

看源码有心了-。-欢迎使用