-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
fix: umi external bug #2560
Conversation
@@ -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/], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/^umi/
-> /^umi\//
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 等也被打进去。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/^umi(\/.*)?$/
会增加 97kb(587 - 490)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
server 不用管大小。
Pull Request Test Coverage Report for Build 3911
💛 - Coveralls |
* 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>
Checklist
npm test
passesDescription of change
umi
shouldn't be external.