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

fix: umi external bug #2560

Merged
merged 4 commits into from
Jun 10, 2019
Merged

fix: umi external bug #2560

merged 4 commits into from
Jun 10, 2019

Conversation

ycjcl868
Copy link
Contributor

Checklist
  • npm test passes
  • tests are included
  • documentation is changed or added
  • commit message follows commit guidelines
Description of change

umi shouldn't be external.

image

@@ -39,7 +39,7 @@ export default function(service, opts = {}) {

if (ssr) {
webpackConfig.externals = nodeExternals({
whitelist: /\.(css|less|sass|scss)$/,
whitelist: [/\.(css|less|sass|scss)$/, /^umi/],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/^umi/ -> /^umi\//

Copy link
Contributor Author

@ycjcl868 ycjcl868 Jun 10, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import { Link } from 'umi' 会被 external 掉。先指定几个 server 用到的 lib

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/^umi\/?$/,避免 umi-plugin-xx、umi-request、umi-test 等也被打进去。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/^umi(\/.*)?$/ 会增加 97kb(587 - 490)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

server 不用管大小。

@coveralls
Copy link

coveralls commented Jun 10, 2019

Pull Request Test Coverage Report for Build 3911

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 35.203%

Totals Coverage Status
Change from base Build 3897: 0.0%
Covered Lines: 1463
Relevant Lines: 4141

💛 - Coveralls

@sorrycc sorrycc merged commit 43f6f2d into feat/ssr Jun 10, 2019
@delete-merged-branch delete-merged-branch bot deleted the fix-umi-external branch June 10, 2019 03:50
sorrycc added a commit that referenced this pull request Jun 19, 2019
* simply alias config

* fix files lost

* build extra ssr bundle

* implement ssr

* fix Invariant Violation

* render html automatically

* data flow

* fix memory history's pathname

* run getInitialProps if need

* code style

* fix ci

* fix ci again

* fix redundent getInitialProps execute

* extract findRoute and add testcases

* normalize data for g_initialData

* support dva

* fix unexpect getInitialProps call

* fix history undefined when config.disableGlobalVaribles is set

* fix findRoutes, Close #2552

* fix: umi external bug (#2560)

* fix: umi external bug

* add: umi and umi/ submodules

* fix: umi external

* fix: umi and umi/*

* support multiple template

* export htmlElement and rootContainer

* fix: 修复 history createMemoryHistory 报错 (#2572)

* Fix ssr hd (#2571)

* fix: 修复 ssr 下 hd document undefined

* add comment

* fix: 修复 ssr 下 css 文件重复 build 的问题 (#2582)

* feat: ssr 支持 dynamicImport (#2584)

* feat: pre render plugin (#2592)

* feat: pre render plugin

* fix: rename umi-plugin-prerender

* rm: .gitignore

* rm: pkg scripts

* fix: use lodash.uniq for test cases

* fix:  throw error when not enabled ssr

* test: cases

* rm: unnecessary pkg

* fix: 修复 React hooks 下多份 ReactDOM 实例报错 bug

* fix: 修复 antd plugin 在 ssr 下报错,ssr 下直接关闭

* fix: use findJS

* fix: test ci

* fix: export ReactDOMServer

* fix: ci test

* format: title

* rm: react and react-dom peer deps

* feat: export react-dom

* format: title code

* fix: locale 插件兼容 ssr,抛出 umi.server.js 错误 (#2602)

* fix: locale 插件兼容 ssr,抛出 umi.server.js 错误

* fix: code format

* 📝 ssr doc (#2607)

* tweak ssr warning (#2609)

* 💄 umijs ssr warning

* fix: warn

* fix: Umijs -> UmiJS

* Fix chunk map (#2616)

* fix: chunkMaps

* 📝 must enable manifest when use ssr

* fix: htmlTemplateMap use map

* fix: publicPath

* fix: yarn.lock

* upd: yarn lock

* Test cases ssr (#2631)

* test: htmlToJSX

* 🚧 af-webpack ssr tests cases

* test: umi-build-dev service

* test: htmlGenerator

* test: replaceChunkMaps

* test: prerender e2e, fix: ssr not generate manifest

* test: add e2e pre-render

* fix: server babel not use corejs

* fix: prerender not render dynamic routing (#2636)

* Fix prerender bug (#2644)

* fix: manifest basePath, and html2JSX

* fix: pre render a little polyfill

* feat: eggjs with umi ssr demo

* fix: mock window

* 📝 umi ssr faq

* rm: manifest

* rm: demo

* fix: .gitignore


Co-authored-by: 信鑫-King <chaolin.jcl@alibaba-inc.com>
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

Successfully merging this pull request may close these issues.

3 participants