Senao · 2022年11月25日 · 浙江

实现扩展 external 能力的 Vite 插件

前言

大家对构建工具中的 external 的属性一定不会陌生吧。在优化构建产物体积需求中可能会引入 CDN 来取代一些基础的模块或工具包,如 React、Vue、lodash 等。
最近没什么事情,闲余时间研究了下 Vite 和 Rollup 的内部实现,借此机会来探究下构建工具是如何处理 external 这一类外部链接的,并对 external 的能力做一些扩展。

如何解析 External

因为 external 的能力主要体现在构建流程,那么我们就从构建的时机开始看起吧。构建的时候 Vite 是依赖于 Rollup 的能力,也就是说 external 的属性主要是在 Rollup 构建上体现出来的。从 Vite 传递给 Rollup 的参数上也可以看出来。

const userExternal = options.rollupOptions?.external
let external = userExternal
const rollupOptions: RollupOptions = {
    context: 'globalThis',
    preserveEntrySignatures: ssr
      ? 'allow-extension'
      : libOptions
      ? 'strict'
      : false,
    ...options.rollupOptions,
    input,
    plugins,
    external,
    onwarn(warning, warn) {
      onRollupWarning(warning, warn, config)
    }
}
const { rollup } = await import('rollup')
const bundle = await rollup(rollupOptions)

那么 Rollup 是如何处理 external 的路径信息呢?

在构建准备阶段我们可以看到有一个初始化的操作:

function normalizeInputOptions(config) {
    const options = {
        // ...
        external: getIdMatcher(config.external)
    };
    return { options, unsetOptions };
}

在 getIdMatcher 函数中有对 config.external 进行初始化流程

const getIdMatcher = (option) => {
    if (option === true) {
        return () => true;
    }
    if (typeof option === 'function') {
        return (id, ...args) => (!id.startsWith('\0') && option(id, ...args)) || false;
    }
    if (option) {
        const ids = new Set();
        const matchers = [];
        for (const value of ensureArray(option)) {
            if (value instanceof RegExp) {
                matchers.push(value);
            }
            else {
                ids.add(value);
            }
        }
        return (id, ..._args) => ids.has(id) || matchers.some(matcher => matcher.test(id));
    }
    return () => false;
};

简单的说就是当用户在 vite.config.* 配置模块中配置了 build.rollupOptions.external 的话,那么 rollup 会收集配置的路径用来进行判断解析的路径是否为外部链接。

options.external = (id, ..._args) => ids.has(id) || matchers.some(matcher => matcher.test(id));

在此大家一定会好奇检测是在什么时机下发生的呢?

Rollup 检测时机

带着这个好奇我们继续往下看吧,Rollup 在初始化配置信息之后就会通过入口来生成 模块依赖图

async generateModuleGraph() {
    (
        { entryModules: this.entryModules, implicitEntryModules: this.implicitEntryModules } =
            await this.moduleLoader.addEntryModules(normalizeEntryModules(this.options.input), true)
    );
}
async build() {
    timeStart('generate module graph', 2);
    await this.generateModuleGraph();
    // ...
}

大家对于模块依赖图一定不会陌生吧,说简单点就是确定模块与模块之间的关系。我们就不一一照着源码来解释生成模块依赖图的流程,那么多无聊呀!

我们可以静下来好好想想,如果让我们来构建项目的模块依赖图,我们应该怎么做呢?

首先,我们肯定需要从配置的 入口(默认 index.html) 开始分析起来,我们可以分析 index.html 模块依赖哪些模块吧,可能 依赖 这个词有些同学不是很懂,那么就用更通俗的话来说 "【我们可以分析 index.html 模块 import 、 script、link 了哪些模块吧】"。分析完 index.html 模块后我们不就又可以分析它依赖的模块嘛,在分析依赖模块之前我们应该要先找一下依赖模块在哪,毕竟依赖模块通常也是文件资源嘛。找到依赖模块的位置后很轻易的就能联想到肯定是要读取依赖模块信息吧,那么熟悉 node 的同学就直接 fs 开干! 那我们读取完了嘞,这还要想嘛,不就也像 index.html 模块一样进行解析然后分析依赖情况嘛。细心的同学就可以发现其实就是一个递归检索依赖模块的过程,好像也没什么难度嘛。

真棒! Rollup 还真就是这么处理的,只不过处理流程的时候会引入插件来协助分析。

那么有同学可能就会说:好像讲离题了唉,这个文章不是要分析 external,怎么讲到了依赖构建的流程呢!

别急嘛,心急吃不了热豆腐。将上面的内容是为了让大家对于 Rollup 执行流程有一个大体的认识,在后续会有关联的。

前面有提到 「找到依赖模块的位置」,Rollup 在处理依赖模块路径的时候会判断当前模块路径是否是 external。

this.resolveId = 
async (source, importer, customOptions, isEntry, skip = null) => {
    return this.getResolvedIdWithDefaults(
       this.getNormalizedResolvedIdWithoutDefaults(
             this.options.external(source, importer, false)
                ? false
                : await resolveId(source, importer, this.options.preserveSymlinks, this.pluginDriver, this.resolveId, skip, customOptions, typeof isEntry === 'boolean' ? isEntry : !importer), 
            importer, 
            source
        )
    );
};

源码上可以了解到当路径被判定为外部链接的情况下是不会执行 await resolveId(...),也就意味着对于外部链接 Rollup 不会对其做处理。

对 external 的扩展目标与思路

好嘞,前文先介绍到这里。我们接下来先确定下对 external 扩展的目标吧

  1. 对 ESM 和 CJS 产物链接做支持且自动引入 CDN 链接。

    • 解释:
      伴随着高版本浏览器支持 ESM 规范。各大包开发者也意识到了 ESM 的重要性,也提供了ESM 规范的产物且同时也有类似 skypack 的 CDN 厂商对ESM 产物的链接做支持。因此插件对于 ESM 外链的支持也是势在必行。
  2. 支持 Vite 2.0及其以上版本。

    • 解释:
      可能大家有疑惑为什么不支持 2.0 之前的版本呢,原因在于 2.0 其实是 Vite 的第一个稳定版本。大家可以在 NPM Version 上看出 2.0 之前的版本基本没什么受众,耗费时间去兼容意义并不是很大。同时在 awesome-vite 库中在申请优秀插件的时候官方也是要求: The plugin/tool is working with Vite 2.x and onward 即对于 Vite 2.x 版本及以上的支持。

好嘞,现在我们已经确认好目标。那么接下来我们就要分析下如何需要如何进行实现。

对 ESM 和 CJS 产物链接做支持且自动引入 CDN 链接 目标的实现

  1. ESM规范产物链接的支持:

    由于高版本浏览器支持对 ESM 链接的支持,那么我们只需要将原先的包模块名称换成 CDN 链接就可以了。就好比将 import react from 'react' 替换为 import react from 'https://cdn.skypack.dev/react'。按照我们先前说的,当我们引入 react 模块,那么在构建阶段 Rollup 就会去找 react 模块究竟在哪里,也就是说寻找 react 模块的具体路径。那么我们只需要告诉 Rollup,react 的具体路径为 https://cdn.skypack.dev/react 不就好了嘛。的确就是这么处理的,不过这里需要提一嘴的是 Rollup 在获取路径后还会通过 external 配置项来确定下获取的链接是否是外链,如果不是外链的话会进一步进行解析,继续解析按照我们先前说的就是去加载资源,我们引入 CDN,不就是想让包体积变小嘛,如果让 Rollup 加载资源,那打包体积不久没优化嘛,我们目标就想要替换 react 为 https://cdn.skypack.dev/react。因此我们需要告诉 Rollup,https://cdn.skypack.dev/react是一个外链,你不要继续解析了。

  2. CJS规范产物链接的支持:

    在早期 JQuery 盛行的年代,我们通常会使用 CDN 的方式来引入 JQuery,然后 CDN 引入的产物执行后会在全局(浏览器环境在 window 下)注入特定的属性,开发者就可以通过这个特定属性来获取 JQuery 的能力。大家可能会有想法,浏览器环境中我们只需要帮忙获取一下 JQuery 在 window 下注入的属性然后将导入语句改一下就好了嘛,就也是将 import jQuery from 'jquery' 替换成 const jQuery = window['jQuery']。这样做也可以,不过需要对不同的导入方式做特定的处理。在这里,我们可以使用更为简单的方式来进行实现,借助 虚拟模块 来进行实现。可能有部分同学对于 虚拟模块 的定义有点陌生,其实顾名思义就是虚假的模块,是一个不存在磁盘空间上的模块。那么我们可以在 虚拟模块 中将我们定义的内容导出就好了,即将 import jQuery from 'jquery' 转换为

    // virtual: jquery
        
    const jQuery = window['jQuery'];
    export default jQuery;
    

    那么执行流程就是 Rollup 加载 jquery 内容其实就转换为我们上述的代码了。

  3. 自动引入 CDN 链接:

    按照以往流程的话,最后一步我们肯定会手动创建 script 或 link 标签插入到 index.html 模块的 head 标签内。由于这个流程过于简单但有可能存在开发人员不用 CDN 后当没将 CDN 链接去除,那就存在一定的开销了,那么我们一并把这个能力做掉吧! 其实这个流程就是对于 html 模块做操作,按照正常想法实现的话肯定是先找到一个能解析 html 模块的工具,将 html 文本转换为 ast 结构的对象,然后递归分析 ast,针对 head 节点做插入处理。这里 也实现了相类似的能力,感兴趣的同学可以看看。

    不过通过借助 Vite 内置 html 插件 的能力,我们可以用更简单的方式来做到。感兴趣的同学可以点击了解一下具体的实现,这里我就简单的说明一下作用吧。插件 会调用 transformIndexHtml,返回值若携带特定的标识符会将信息注入到 html 特定的地方,使用方式可见 官方文章。那么我们只需要在 transformIndexHtml 钩子中返回信息,Vite 的内置 插件 就会帮我们处理。

支持 Vite 2.0及其以上版本 目标的实现:

在上文 【ESM规范产物链接的支持】 中有提到我们需要告诉 Rollup 对于 ESM 规范的 CDN 链接不需要继续做解析,因此需要在 Rollup 配置上新增 external 属性。由于 ESM 外链支持异步化(配置外链的流程很大程度会接入平台),而对于在 2.0 ~ 2.2 版本之间 Vite 并不支持异步配置。只能在 vite.config.* 模块中手动添加 external。

结束语

好嘞,到此实现思路就已经聊完了。相信大部分的同学已经可以写出 external 这一类的插件了,感觉还是蛮有意思的。我已经将实现的思路代码化了,感兴趣的同学可以将 项目 clone 下来。在此我也很期待大家能给 仓库 带来好的 想法 和 贡献,当然能留下您的 Star 再好不过了,感谢大家的阅读!

推荐阅读

( ! ) Fatal error: Uncaught TypeError: Argument 1 passed to HyperDown\Parser::initText() must be of the type string, null given, called in /Data/webapps/aijishu/lib/HyperDown/Parser.php on line 159 and defined in /Data/webapps/aijishu/lib/HyperDown/Parser.php on line 211
( ! ) TypeError: Argument 1 passed to HyperDown\Parser::initText() must be of the type string, null given, called in /Data/webapps/aijishu/lib/HyperDown/Parser.php on line 159 in /Data/webapps/aijishu/lib/HyperDown/Parser.php on line 211
Call Stack
#TimeMemoryFunctionLocation
10.0000352224{main}( ).../index.php:0
20.0000352560require( '/Data/webapps/aijishu/config/loader.php ).../index.php:3
30.0001397488L8\App::run( $routes = ['@' => 'Page#notFound', '/status.html' => 'null:Page#status', '/robots.txt' => 'null:Page#robots', '/api' => ['post:/article/add' => 'init+login:Api\\Article#add', 'post:/article/edit' => 'init+login:Api\\Article#edit', 'post:/question/add' => 'init+login:Api\\Question#add', 'post:/question/edit' => 'init+login:Api\\Question#edit', 'get:/channel/newest' => 'Api\\Feed?tab=newest#contents', 'get:/channel/hottest' => 'Api\\Feed?tab=hottest#contents', 'get:/channel/recommend' => 'Api\\Feed?tab=recommend#contents', 'get:/channel/subscribed' => 'init+login:Api\\Feed?tab=subscribed#contents', 'get:/channel/[id]/tag/[tagId]' => 'Api\\Feed?tab=newest#contents', 'get:/channel/[id]' => 'Api\\Feed?tab=newest#contents', 'get:/article/newest' => 'Api\\Article?tab=newest#articles', 'get:/article/hottest' => 'Api\\Article?tab=hottest#articles', 'get:/article/recommend' => 'Api\\Article?tab=recommend#articles', 'get:/article/subscribed' => 'Api\\Article?tab=subscribed#articles', 'get:/article/channel/[id]/tag/[tagId]' => 'Api\\Article?tab=channel#articles', 'get:/article/channel/[id]' => 'Api\\Article?tab=channel#articles', 'post:/article/[id]/blog/delete' => 'init+login:Api\\Article#deleteBlog', 'post:/article/[id]/delete' => 'init+login:Api\\Article#delete', 'post:/article/[id]/bookmark' => 'init+login:Api\\Article#bookmark', 'post:/article/[id]/bookmark/cancel' => 'init+login:Api\\Article#cancelBookmark', 'post:/article/[id]/vote/up' => 'init+login:Api\\Article#voteUp', 'post:/article/[id]/vote/up/cancel' => 'init+login:Api\\Article#voteUpCancel', 'post:/article/[id]/recommend' => 'init+login:Api\\Article#recommend', 'post:/article/[id]/recommend/cancel' => 'init+login:Api\\Article#recommendCancel', 'post:/article/[id]/stick' => 'init+login:Api\\Article#stick', 'post:/article/[id]/stick/cancel' => 'init+login:Api\\Article#stickCancel', 'post:/article/[id]/hide' => 'init+login:Api\\Article#hide', 'post:/article/[id]/hide/cancel' => 'init+login:Api\\Article#hideCancel', 'post:/article/[id]/report' => 'init+login:Api\\Article#report', 'post:/article/file' => 'Api\\Storage?type=file#uploadLargeFile', 'get:/question/newest' => 'Api\\Question?tab=newest#questions', 'get:/question/hottest' => 'Api\\Question?tab=hottest#questions', 'get:/question/unanswered' => 'Api\\Question?tab=unanswered#questions', 'get:/question/channel/[id]' => 'Api\\Question?tab=channel#questions', 'post:/question/[id]/delete' => 'init+login:Api\\Question#delete', 'post:/question/[id]/bookmark' => 'init+login:Api\\Question#bookmark', 'post:/question/[id]/bookmark/cancel' => 'init+login:Api\\Question#cancelBookmark', 'post:/question/[id]/vote/up' => 'init+login:Api\\Question#voteUp', 'post:/question/[id]/vote/up/cancel' => 'init+login:Api\\Question#voteUpCancel', 'post:/question/[id]/vote/down' => 'init+login:Api\\Question#voteDown', 'post:/question/[id]/vote/down/cancel' => 'init+login:Api\\Question#voteDownCancel', 'post:/question/[id]/follow' => 'init+login:Api\\Question#follow', 'post:/question/[id]/follow/cancel' => 'init+login:Api\\Question#cancelFollow', 'post:/question/[id]/report' => 'init+login:Api\\Question#report', 'post:/question/[id]/invite' => 'init+login:Api\\Question#invite', 'post:/question/[id]/invite/cancel' => 'init+login:Api\\Question#cancelInvite', 'post:/answer/add' => 'init+login:Api\\Answer#add', 'post:/answer/edit' => 'init+login:Api\\Answer#edit', 'post:/answer/[id]/delete' => 'init+login:Api\\Answer#delete', 'post:/answer/[id]/accept' => 'init+login:Api\\Answer#accept', 'post:/answer/[id]/accept/cancel' => 'init+login:Api\\Answer#acceptCancel', 'post:/answer/[id]/vote/up' => 'init+login:Api\\Answer#voteUp', 'post:/answer/[id]/vote/up/cancel' => 'init+login:Api\\Answer#voteUpCancel', 'post:/answer/[id]/vote/down' => 'init+login:Api\\Answer#voteDown', 'post:/answer/[id]/vote/down/cancel' => 'init+login:Api\\Answer#voteDownCancel', 'post:/answer/[id]/report' => 'init+login:Api\\Answer#report', 'get:/user/[id]/timeline' => 'Api\\User#timeline', 'post:/user/avatar' => 'init+login:Api\\Storage?type=avatar#upload+userAvatar', 'post:/user/register/send' => 'Api\\Account#sendCode', 'post:/user/register' => 'Api\\Account#register', 'post:/user/login' => 'Api\\Account#login', 'post:/user/[id]/follow' => 'init+login:Api\\User#follow', 'post:/user/[id]/follow/cancel' => 'init+login:Api\\User#cancelFollow', 'get:/user/search' => 'init+login:Api\\User#search', 'get:/user/events' => 'init+login:Api\\User#events', 'post:/user/events/viewedAll' => 'init+login:Api\\User#eventsViewedAll', 'post:/user/events/[id]/view' => 'init+login:Api\\User#eventsViewed', 'post:/user/privacy/allowed' => 'init+login:Api\\User#allowedPrivacy', 'post:/user/setting/info' => 'init+login:Api\\Account#infoSetting', 'post:/user/setting/notification' => 'init+login:Api\\Account#notificationSetting', 'post:/user/setting/privacy' => 'init+login:Api\\Account#privacySetting', 'post:/user/setting/mail' => 'init+login:Api\\Account#setMail', 'post:/user/setting/mail/confirm' => 'init+login:Api\\Account#setMailConfirm', 'post:/user/setting/phone' => 'init+login:Api\\Account#setPhone', 'post:/user/setting/phone/confirm' => 'init+login:Api\\Account#setPhoneConfirm', 'post:/user/setting/password' => 'init+login:Api\\Account#setPassword', 'post:/user/password/reset' => 'Api\\Account#resetPassword', 'post:/user/password/reset/proceed' => 'Api\\Account#resetPasswordProceed', 'post:/user/password/reset/confirm' => 'Api\\Account#resetPasswordConfirm', 'post:/user/[id]/report' => 'init+login:Api\\Comment#report', 'get:/blog/[id]/articles' => 'Api\\Article?tab=blog#articles', 'get:/blog/[id]/contents' => 'Api\\Blog#blog+contents', 'post:/blog/[id]/avatar' => 'init+login:Api\\Storage?type=avatar#upload+blogAvatar', 'post:/blog/add' => 'init+login:Api\\Blog#add', 'post:/blog/[id]/edit' => 'init+login:Api\\Blog#edit', 'post:/blog/[id]/follow' => 'init+login:Api\\Blog#follow', 'post:/blog/[id]/follow/cancel' => 'init+login:Api\\Blog#cancelFollow', 'post:/blog/[id]/author/invite' => 'init+login:Api\\BlogAuthor#invite', 'post:/blog/[id]/author/confirm' => 'init+login:Api\\BlogAuthor#confirm', 'post:/blog/[id]/author/refuse' => 'init+login:Api\\BlogAuthor#refuse', 'post:/blog/[id]/author/delete' => 'init+login:Api\\BlogAuthor#delete', 'post:/blog/[id]/author/change' => 'init+login:Api\\BlogAuthor#change', 'get:/comment/list/[id]' => 'Api\\Comment#comments', 'post:/comment/add' => 'init+login:Api\\Comment#add', 'post:/comment/edit' => 'init+login:Api\\Comment#edit', 'post:/comment/[id]/delete' => 'init+login:Api\\Comment#delete', 'post:/comment/[id]/vote/up' => 'init+login:Api\\Comment#voteUp', 'post:/comment/[id]/vote/up/cancel' => 'init+login:Api\\Comment#voteUpCancel', 'post:/comment/[id]/report' => 'init+login:Api\\Comment#report', 'post:/tag/add' => 'init+login:Api\\Tag#add', 'post:/tag/edit' => 'init+login:Api\\Tag#edit', 'get:/tag/default' => 'Api\\Tag#defaultTags', 'post:/tag/[id]/follow' => 'init+login:Api\\Tag#follow', 'post:/tag/[id]/follow/cancel' => 'init+login:Api\\Tag#cancelFollow', 'get:/reason/[model]/[method]' => 'init+login:Api\\Reason#getReasons', 'post:/storage/image' => 'init+login:Api\\Storage?type=image#upload+image', 'get:/storage/signature/upyun' => 'init+login:Api\\Storage?type=file#getUpyunSignature', 'get:/storage/signature' => 'init+login:Api\\Storage?type=file#getAliyunSignature', 'post:/storage/signature/qiniu' => 'init+login:Api\\Storage?type=file#getQiniuSignature', 'get:/wechat/events' => 'Api\\Wechat#events', 'post:/wechat/events' => 'Api\\Wechat#events', 'get:/wechat/menu' => 'Api\\Wechat#menu', 'get:/wechat/qrcode' => 'Api\\Wechat#qrcode', 'get:/wechat/checkLogin' => 'Api\\Wechat#checkLogin', 'post:/l/add' => 'init+login:Api\\Live#add', 'post:/l/[id]/edit' => 'init+login:Api\\Live#edit', 'post:/l/[id]/delete' => 'init+login:Api\\Live#delete', 'post:/l/[id]/finish' => 'init+login:Api\\Live#finish', 'post:/l/[id]/continue' => 'init+login:Api\\Live#continue', 'post:/l/[id]/setPlayback' => 'init+login:Api\\Live#setPlayback', 'post:/l/[id]/setPlayback/cancel' => 'init+login:Api\\Live#cancelPlayback', 'post:/l/sign' => 'init+login:Api\\Live#sign', 'post:/l/[id]/stick' => 'init+login:Api\\Live#stick', 'post:/l/[id]/stick/cancel' => 'init+login:Api\\Live#stickCancel', 'post:/l/[id]/hide' => 'init+login:Api\\Live#hide', 'post:/l/[id]/hide/cancel' => 'init+login:Api\\Live#hideCancel', 'get:/l/[id]/learntime' => 'init+login:Api\\Live#learntime', 'get:/polyv/[vid]/token' => 'init+login:Api\\Live#polyvToken', ...], '/' => 'Index?tab=newest#block+index', '/newest' => 'Index?tab=newest#block+index', '/hottest' => 'Index?tab=hottest#block+index', '/subscribed' => 'init+login:Index?tab=subscribed#block+index', '/channel/[slug]/tag/[tag]' => 'Index?tab=channel#block+index', '/channel/[slug]' => 'Index?tab=channel#block+index', '/channel/[slug]/articles' => 'Article?tab=channel#block+index', '/channel/[slug]/questions' => 'Question?tab=channel#block+index', '/search' => 'Index#search', '/a/[id]' => 'Article#detail', '/a/[id]/downloads' => 'init+login:Article#downloadRecord', '/a/[id]/exportDownloads' => 'init+login:Article#exportDownloadRecord', '/a/[id]/edit' => 'init+login:Article#write', '/write' => 'init+login:Article#write', '/blogs/channel/[slug]' => 'Blog#index', '/blogs' => 'Blog#index', '/blog/[slug]' => 'Blog#blog+detail', '/blog/[slug]/setting' => 'init+login:Blog#blog+setting', '/questions' => 'Question?tab=newest#block+index', '/questions/newest' => 'Question?tab=newest#block+index', '/questions/hottest' => 'Question?tab=hottest#block+index', '/questions/unanswered' => 'Question?tab=unanswered#block+index', '/questions/channel/[slug]/tag/[tag]' => 'Question?tab=channel#block+index', '/questions/channel/[slug]' => 'Question?tab=channel#block+index', '/q/[id]' => 'Question#detail', '/q/[id]/edit' => 'init+login:Question#write', '/ask' => 'init+login:Question#write', '/q/[id]/answer/[aid]' => 'init+login:Question#detail', '/q/[id]/answer/[aid]/edit' => 'init+login:Question#answerEdit', '/events' => 'Activity?tab=newest#cities+index', '/events/newest' => 'Activity?tab=newest#cities+index', '/events/mine' => 'Activity?tab=mine#cities+index', '/events/signed' => 'Activity?tab=signed#cities+index', '/events/city/[city]' => 'Activity#cities+index', '/events/write' => 'init+login:Activity#write', '/e/[id]/edit' => 'init+login:Activity#write', '/e/[id]/join' => 'init+login:Activity#join', '/e/[id]/members' => 'init+login:Activity#members', '/e/[id]/members-hook' => 'init+login:Activity#membersHook', '/e/[id]/exportMembers' => 'init+login:Activity#exportMembers', '/e/[id]/exportMembersHook' => 'init+login:Activity#exportMembersHook', '/e/[id]' => 'Activity#detail', '/t/[slug]' => 'Tag#tag+block+index', '/t/[slug]/questions' => 'Tag#tag+block+questions', '/t/[slug]/articles' => 'Tag#tag+block+articles', '/u/[slug]' => 'User#user+index', '/u/[slug]/questions' => 'User#user+questions', '/u/[slug]/answers' => 'User#user+answers', '/u/[slug]/articles' => 'User#user+articles', '/u/[slug]/articles/trash' => 'User#user+trashedArticles', '/u/[slug]/[type]/following' => 'User#user+following', '/u/[slug]/fans' => 'User#user+fans', '/u/[slug]/bookmarks' => 'User#user+bookmarks', '/u/[slug]/ranks' => 'User#user+ranks', '/user/events' => 'init+login:User#events', '/user/captcha' => 'User#captcha', '/login' => 'Account#login', '/register' => 'Account#login', '/user/password' => 'Account#password', '/user/settings' => 'init+login:Account#settings', '/user/security' => 'init+login:Account#security', '/logout' => 'init+login:Account#logout', '/user/oauth/[type]?code' => 'OAuth#config+oAuth2Token', '/user/oauth/[type]' => 'OAuth#config+redirect', '/user/binding/[id]/[type]/cancel' => 'init+login:Account#bindingCancel', '/user/[id]/change' => 'init+login:Account#change', '/user/change/cancel' => 'init+login:Account#cancelChange', '/user/mail/unsubscribe' => 'User#unsubscribeMail', '/about' => 'Page#about', '/privacy' => 'Page#privacy', '/tos' => 'Page#tos', '/rules' => 'Page#rules', '/help' => 'Page#help', '/links' => 'Page#links', '/referer' => 'Page#referer', '/MP_verify_qFSAa4qd4Ri3EJOr.txt' => 'Page?title=qFSAa4qd4Ri3EJOr#text', '/ByteDanceVerify.html' => 'Page?title=Zd3BnU%2BycRCDS4Z3WT3X#html', '/sogousiteverification.txt' => 'Page?title=CHuGWalK2x#text', '/img/[id]' => 'Storage#image', '/file/[id]' => 'init+login:Storage#file', '/lives' => 'Live#index', '/lives/mine' => 'init+login:Live?tab=mine#index', '/lives/add' => 'init+login:Live#write', '/l/[id]/edit' => 'init+login:Live#write', '/l/[id]/members' => 'init+login:Live#members', '/l/[id]/exportMembers' => 'init+login:Live#exportMembers', '/l/[id]/learns' => 'init+login:Live#learns', '/l/[id]/exportLearns' => 'init+login:Live#exportLearns', '/l/[id]/cover' => 'Live#cover', '/l/[id]' => 'Live#detail', '/l/[id]/join' => 'Live#join', '/weblive/[id]' => 'Live#weblive', '/download' => 'File#block+index', '/download/apply' => 'init+login:File#apply', '/drafts' => 'init+login:Draft#index', '/topics' => 'Explore#index', '/topic/[id]' => 'Explore#detail', '/link' => 'Link#redirect', '/stopics/zhouyinpu' => 'Stopics#zhouyinpu', '/stopics/xingchencpu' => 'Stopics#xingchencpu', '/stopics/aliyun-yitian' => 'Stopics#yitian', '/stopics/avh-on-baidu-cloud' => 'Stopics#avh', '/stopics/anolis-os' => 'Stopics#anolis', '/ailab' => 'AILab#index', '/ailab/models/[id]' => 'AILab#detail', '/ailab/models' => 'AILab#models', '/books' => 'Read#index', '/search_sitemap/aijishu.txt' => 'Index#sitemapRedirect', '/search_sitemap/aijishu.xml' => 'Index#sitemap', 'send_mail' => 'Cli\\Queue#mail', 'send_marketing_mail' => 'Cli\\Queue#marketingMail', 'send_sms' => 'Cli\\Queue#aliSms', 'ranking' => 'Cli\\Ranking#ranking', 'import_tags' => 'Cli\\Import#tags', 'import_feed' => 'Cli\\Import#feed', 'hot_questions' => 'Cli\\Hot#questions', 'hot_articles' => 'Cli\\Hot#articles', 'wechat_events' => 'Cli\\WechatEventsQueue#events', 'update_live_status' => 'Cli\\Live#updateLivesStatus', 'update_affiliate' => 'Cli\\Affiliate#update', 'generateUser' => 'Cli\\GenerateUser#run', 'generateUserSF' => 'Cli\\GenerateUserSF#run', 'resetName' => 'Cli\\GenerateUserSF#resetName', 'activity_coming' => 'Cli\\Activity#notification', ...] ).../loader.php:48
40.0002398792L8\Mvc\Server->__construct( $routes = ['@' => 'Page#notFound', '/status.html' => 'null:Page#status', '/robots.txt' => 'null:Page#robots', '/api' => ['post:/article/add' => 'init+login:Api\\Article#add', 'post:/article/edit' => 'init+login:Api\\Article#edit', 'post:/question/add' => 'init+login:Api\\Question#add', 'post:/question/edit' => 'init+login:Api\\Question#edit', 'get:/channel/newest' => 'Api\\Feed?tab=newest#contents', 'get:/channel/hottest' => 'Api\\Feed?tab=hottest#contents', 'get:/channel/recommend' => 'Api\\Feed?tab=recommend#contents', 'get:/channel/subscribed' => 'init+login:Api\\Feed?tab=subscribed#contents', 'get:/channel/[id]/tag/[tagId]' => 'Api\\Feed?tab=newest#contents', 'get:/channel/[id]' => 'Api\\Feed?tab=newest#contents', 'get:/article/newest' => 'Api\\Article?tab=newest#articles', 'get:/article/hottest' => 'Api\\Article?tab=hottest#articles', 'get:/article/recommend' => 'Api\\Article?tab=recommend#articles', 'get:/article/subscribed' => 'Api\\Article?tab=subscribed#articles', 'get:/article/channel/[id]/tag/[tagId]' => 'Api\\Article?tab=channel#articles', 'get:/article/channel/[id]' => 'Api\\Article?tab=channel#articles', 'post:/article/[id]/blog/delete' => 'init+login:Api\\Article#deleteBlog', 'post:/article/[id]/delete' => 'init+login:Api\\Article#delete', 'post:/article/[id]/bookmark' => 'init+login:Api\\Article#bookmark', 'post:/article/[id]/bookmark/cancel' => 'init+login:Api\\Article#cancelBookmark', 'post:/article/[id]/vote/up' => 'init+login:Api\\Article#voteUp', 'post:/article/[id]/vote/up/cancel' => 'init+login:Api\\Article#voteUpCancel', 'post:/article/[id]/recommend' => 'init+login:Api\\Article#recommend', 'post:/article/[id]/recommend/cancel' => 'init+login:Api\\Article#recommendCancel', 'post:/article/[id]/stick' => 'init+login:Api\\Article#stick', 'post:/article/[id]/stick/cancel' => 'init+login:Api\\Article#stickCancel', 'post:/article/[id]/hide' => 'init+login:Api\\Article#hide', 'post:/article/[id]/hide/cancel' => 'init+login:Api\\Article#hideCancel', 'post:/article/[id]/report' => 'init+login:Api\\Article#report', 'post:/article/file' => 'Api\\Storage?type=file#uploadLargeFile', 'get:/question/newest' => 'Api\\Question?tab=newest#questions', 'get:/question/hottest' => 'Api\\Question?tab=hottest#questions', 'get:/question/unanswered' => 'Api\\Question?tab=unanswered#questions', 'get:/question/channel/[id]' => 'Api\\Question?tab=channel#questions', 'post:/question/[id]/delete' => 'init+login:Api\\Question#delete', 'post:/question/[id]/bookmark' => 'init+login:Api\\Question#bookmark', 'post:/question/[id]/bookmark/cancel' => 'init+login:Api\\Question#cancelBookmark', 'post:/question/[id]/vote/up' => 'init+login:Api\\Question#voteUp', 'post:/question/[id]/vote/up/cancel' => 'init+login:Api\\Question#voteUpCancel', 'post:/question/[id]/vote/down' => 'init+login:Api\\Question#voteDown', 'post:/question/[id]/vote/down/cancel' => 'init+login:Api\\Question#voteDownCancel', 'post:/question/[id]/follow' => 'init+login:Api\\Question#follow', 'post:/question/[id]/follow/cancel' => 'init+login:Api\\Question#cancelFollow', 'post:/question/[id]/report' => 'init+login:Api\\Question#report', 'post:/question/[id]/invite' => 'init+login:Api\\Question#invite', 'post:/question/[id]/invite/cancel' => 'init+login:Api\\Question#cancelInvite', 'post:/answer/add' => 'init+login:Api\\Answer#add', 'post:/answer/edit' => 'init+login:Api\\Answer#edit', 'post:/answer/[id]/delete' => 'init+login:Api\\Answer#delete', 'post:/answer/[id]/accept' => 'init+login:Api\\Answer#accept', 'post:/answer/[id]/accept/cancel' => 'init+login:Api\\Answer#acceptCancel', 'post:/answer/[id]/vote/up' => 'init+login:Api\\Answer#voteUp', 'post:/answer/[id]/vote/up/cancel' => 'init+login:Api\\Answer#voteUpCancel', 'post:/answer/[id]/vote/down' => 'init+login:Api\\Answer#voteDown', 'post:/answer/[id]/vote/down/cancel' => 'init+login:Api\\Answer#voteDownCancel', 'post:/answer/[id]/report' => 'init+login:Api\\Answer#report', 'get:/user/[id]/timeline' => 'Api\\User#timeline', 'post:/user/avatar' => 'init+login:Api\\Storage?type=avatar#upload+userAvatar', 'post:/user/register/send' => 'Api\\Account#sendCode', 'post:/user/register' => 'Api\\Account#register', 'post:/user/login' => 'Api\\Account#login', 'post:/user/[id]/follow' => 'init+login:Api\\User#follow', 'post:/user/[id]/follow/cancel' => 'init+login:Api\\User#cancelFollow', 'get:/user/search' => 'init+login:Api\\User#search', 'get:/user/events' => 'init+login:Api\\User#events', 'post:/user/events/viewedAll' => 'init+login:Api\\User#eventsViewedAll', 'post:/user/events/[id]/view' => 'init+login:Api\\User#eventsViewed', 'post:/user/privacy/allowed' => 'init+login:Api\\User#allowedPrivacy', 'post:/user/setting/info' => 'init+login:Api\\Account#infoSetting', 'post:/user/setting/notification' => 'init+login:Api\\Account#notificationSetting', 'post:/user/setting/privacy' => 'init+login:Api\\Account#privacySetting', 'post:/user/setting/mail' => 'init+login:Api\\Account#setMail', 'post:/user/setting/mail/confirm' => 'init+login:Api\\Account#setMailConfirm', 'post:/user/setting/phone' => 'init+login:Api\\Account#setPhone', 'post:/user/setting/phone/confirm' => 'init+login:Api\\Account#setPhoneConfirm', 'post:/user/setting/password' => 'init+login:Api\\Account#setPassword', 'post:/user/password/reset' => 'Api\\Account#resetPassword', 'post:/user/password/reset/proceed' => 'Api\\Account#resetPasswordProceed', 'post:/user/password/reset/confirm' => 'Api\\Account#resetPasswordConfirm', 'post:/user/[id]/report' => 'init+login:Api\\Comment#report', 'get:/blog/[id]/articles' => 'Api\\Article?tab=blog#articles', 'get:/blog/[id]/contents' => 'Api\\Blog#blog+contents', 'post:/blog/[id]/avatar' => 'init+login:Api\\Storage?type=avatar#upload+blogAvatar', 'post:/blog/add' => 'init+login:Api\\Blog#add', 'post:/blog/[id]/edit' => 'init+login:Api\\Blog#edit', 'post:/blog/[id]/follow' => 'init+login:Api\\Blog#follow', 'post:/blog/[id]/follow/cancel' => 'init+login:Api\\Blog#cancelFollow', 'post:/blog/[id]/author/invite' => 'init+login:Api\\BlogAuthor#invite', 'post:/blog/[id]/author/confirm' => 'init+login:Api\\BlogAuthor#confirm', 'post:/blog/[id]/author/refuse' => 'init+login:Api\\BlogAuthor#refuse', 'post:/blog/[id]/author/delete' => 'init+login:Api\\BlogAuthor#delete', 'post:/blog/[id]/author/change' => 'init+login:Api\\BlogAuthor#change', 'get:/comment/list/[id]' => 'Api\\Comment#comments', 'post:/comment/add' => 'init+login:Api\\Comment#add', 'post:/comment/edit' => 'init+login:Api\\Comment#edit', 'post:/comment/[id]/delete' => 'init+login:Api\\Comment#delete', 'post:/comment/[id]/vote/up' => 'init+login:Api\\Comment#voteUp', 'post:/comment/[id]/vote/up/cancel' => 'init+login:Api\\Comment#voteUpCancel', 'post:/comment/[id]/report' => 'init+login:Api\\Comment#report', 'post:/tag/add' => 'init+login:Api\\Tag#add', 'post:/tag/edit' => 'init+login:Api\\Tag#edit', 'get:/tag/default' => 'Api\\Tag#defaultTags', 'post:/tag/[id]/follow' => 'init+login:Api\\Tag#follow', 'post:/tag/[id]/follow/cancel' => 'init+login:Api\\Tag#cancelFollow', 'get:/reason/[model]/[method]' => 'init+login:Api\\Reason#getReasons', 'post:/storage/image' => 'init+login:Api\\Storage?type=image#upload+image', 'get:/storage/signature/upyun' => 'init+login:Api\\Storage?type=file#getUpyunSignature', 'get:/storage/signature' => 'init+login:Api\\Storage?type=file#getAliyunSignature', 'post:/storage/signature/qiniu' => 'init+login:Api\\Storage?type=file#getQiniuSignature', 'get:/wechat/events' => 'Api\\Wechat#events', 'post:/wechat/events' => 'Api\\Wechat#events', 'get:/wechat/menu' => 'Api\\Wechat#menu', 'get:/wechat/qrcode' => 'Api\\Wechat#qrcode', 'get:/wechat/checkLogin' => 'Api\\Wechat#checkLogin', 'post:/l/add' => 'init+login:Api\\Live#add', 'post:/l/[id]/edit' => 'init+login:Api\\Live#edit', 'post:/l/[id]/delete' => 'init+login:Api\\Live#delete', 'post:/l/[id]/finish' => 'init+login:Api\\Live#finish', 'post:/l/[id]/continue' => 'init+login:Api\\Live#continue', 'post:/l/[id]/setPlayback' => 'init+login:Api\\Live#setPlayback', 'post:/l/[id]/setPlayback/cancel' => 'init+login:Api\\Live#cancelPlayback', 'post:/l/sign' => 'init+login:Api\\Live#sign', 'post:/l/[id]/stick' => 'init+login:Api\\Live#stick', 'post:/l/[id]/stick/cancel' => 'init+login:Api\\Live#stickCancel', 'post:/l/[id]/hide' => 'init+login:Api\\Live#hide', 'post:/l/[id]/hide/cancel' => 'init+login:Api\\Live#hideCancel', 'get:/l/[id]/learntime' => 'init+login:Api\\Live#learntime', 'get:/polyv/[vid]/token' => 'init+login:Api\\Live#polyvToken', ...], '/' => 'Index?tab=newest#block+index', '/newest' => 'Index?tab=newest#block+index', '/hottest' => 'Index?tab=hottest#block+index', '/subscribed' => 'init+login:Index?tab=subscribed#block+index', '/channel/[slug]/tag/[tag]' => 'Index?tab=channel#block+index', '/channel/[slug]' => 'Index?tab=channel#block+index', '/channel/[slug]/articles' => 'Article?tab=channel#block+index', '/channel/[slug]/questions' => 'Question?tab=channel#block+index', '/search' => 'Index#search', '/a/[id]' => 'Article#detail', '/a/[id]/downloads' => 'init+login:Article#downloadRecord', '/a/[id]/exportDownloads' => 'init+login:Article#exportDownloadRecord', '/a/[id]/edit' => 'init+login:Article#write', '/write' => 'init+login:Article#write', '/blogs/channel/[slug]' => 'Blog#index', '/blogs' => 'Blog#index', '/blog/[slug]' => 'Blog#blog+detail', '/blog/[slug]/setting' => 'init+login:Blog#blog+setting', '/questions' => 'Question?tab=newest#block+index', '/questions/newest' => 'Question?tab=newest#block+index', '/questions/hottest' => 'Question?tab=hottest#block+index', '/questions/unanswered' => 'Question?tab=unanswered#block+index', '/questions/channel/[slug]/tag/[tag]' => 'Question?tab=channel#block+index', '/questions/channel/[slug]' => 'Question?tab=channel#block+index', '/q/[id]' => 'Question#detail', '/q/[id]/edit' => 'init+login:Question#write', '/ask' => 'init+login:Question#write', '/q/[id]/answer/[aid]' => 'init+login:Question#detail', '/q/[id]/answer/[aid]/edit' => 'init+login:Question#answerEdit', '/events' => 'Activity?tab=newest#cities+index', '/events/newest' => 'Activity?tab=newest#cities+index', '/events/mine' => 'Activity?tab=mine#cities+index', '/events/signed' => 'Activity?tab=signed#cities+index', '/events/city/[city]' => 'Activity#cities+index', '/events/write' => 'init+login:Activity#write', '/e/[id]/edit' => 'init+login:Activity#write', '/e/[id]/join' => 'init+login:Activity#join', '/e/[id]/members' => 'init+login:Activity#members', '/e/[id]/members-hook' => 'init+login:Activity#membersHook', '/e/[id]/exportMembers' => 'init+login:Activity#exportMembers', '/e/[id]/exportMembersHook' => 'init+login:Activity#exportMembersHook', '/e/[id]' => 'Activity#detail', '/t/[slug]' => 'Tag#tag+block+index', '/t/[slug]/questions' => 'Tag#tag+block+questions', '/t/[slug]/articles' => 'Tag#tag+block+articles', '/u/[slug]' => 'User#user+index', '/u/[slug]/questions' => 'User#user+questions', '/u/[slug]/answers' => 'User#user+answers', '/u/[slug]/articles' => 'User#user+articles', '/u/[slug]/articles/trash' => 'User#user+trashedArticles', '/u/[slug]/[type]/following' => 'User#user+following', '/u/[slug]/fans' => 'User#user+fans', '/u/[slug]/bookmarks' => 'User#user+bookmarks', '/u/[slug]/ranks' => 'User#user+ranks', '/user/events' => 'init+login:User#events', '/user/captcha' => 'User#captcha', '/login' => 'Account#login', '/register' => 'Account#login', '/user/password' => 'Account#password', '/user/settings' => 'init+login:Account#settings', '/user/security' => 'init+login:Account#security', '/logout' => 'init+login:Account#logout', '/user/oauth/[type]?code' => 'OAuth#config+oAuth2Token', '/user/oauth/[type]' => 'OAuth#config+redirect', '/user/binding/[id]/[type]/cancel' => 'init+login:Account#bindingCancel', '/user/[id]/change' => 'init+login:Account#change', '/user/change/cancel' => 'init+login:Account#cancelChange', '/user/mail/unsubscribe' => 'User#unsubscribeMail', '/about' => 'Page#about', '/privacy' => 'Page#privacy', '/tos' => 'Page#tos', '/rules' => 'Page#rules', '/help' => 'Page#help', '/links' => 'Page#links', '/referer' => 'Page#referer', '/MP_verify_qFSAa4qd4Ri3EJOr.txt' => 'Page?title=qFSAa4qd4Ri3EJOr#text', '/ByteDanceVerify.html' => 'Page?title=Zd3BnU%2BycRCDS4Z3WT3X#html', '/sogousiteverification.txt' => 'Page?title=CHuGWalK2x#text', '/img/[id]' => 'Storage#image', '/file/[id]' => 'init+login:Storage#file', '/lives' => 'Live#index', '/lives/mine' => 'init+login:Live?tab=mine#index', '/lives/add' => 'init+login:Live#write', '/l/[id]/edit' => 'init+login:Live#write', '/l/[id]/members' => 'init+login:Live#members', '/l/[id]/exportMembers' => 'init+login:Live#exportMembers', '/l/[id]/learns' => 'init+login:Live#learns', '/l/[id]/exportLearns' => 'init+login:Live#exportLearns', '/l/[id]/cover' => 'Live#cover', '/l/[id]' => 'Live#detail', '/l/[id]/join' => 'Live#join', '/weblive/[id]' => 'Live#weblive', '/download' => 'File#block+index', '/download/apply' => 'init+login:File#apply', '/drafts' => 'init+login:Draft#index', '/topics' => 'Explore#index', '/topic/[id]' => 'Explore#detail', '/link' => 'Link#redirect', '/stopics/zhouyinpu' => 'Stopics#zhouyinpu', '/stopics/xingchencpu' => 'Stopics#xingchencpu', '/stopics/aliyun-yitian' => 'Stopics#yitian', '/stopics/avh-on-baidu-cloud' => 'Stopics#avh', '/stopics/anolis-os' => 'Stopics#anolis', '/ailab' => 'AILab#index', '/ailab/models/[id]' => 'AILab#detail', '/ailab/models' => 'AILab#models', '/books' => 'Read#index', '/search_sitemap/aijishu.txt' => 'Index#sitemapRedirect', '/search_sitemap/aijishu.xml' => 'Index#sitemap', 'send_mail' => 'Cli\\Queue#mail', 'send_marketing_mail' => 'Cli\\Queue#marketingMail', 'send_sms' => 'Cli\\Queue#aliSms', 'ranking' => 'Cli\\Ranking#ranking', 'import_tags' => 'Cli\\Import#tags', 'import_feed' => 'Cli\\Import#feed', 'hot_questions' => 'Cli\\Hot#questions', 'hot_articles' => 'Cli\\Hot#articles', 'wechat_events' => 'Cli\\WechatEventsQueue#events', 'update_live_status' => 'Cli\\Live#updateLivesStatus', 'update_affiliate' => 'Cli\\Affiliate#update', 'generateUser' => 'Cli\\GenerateUser#run', 'generateUserSF' => 'Cli\\GenerateUserSF#run', 'resetName' => 'Cli\\GenerateUserSF#resetName', 'activity_coming' => 'Cli\\Activity#notification', ...] ).../App.php:71
50.0003399840L8\Mvc\Server::serve( $controller = 'Article#detail', $request = class L8\Mvc\Request { private $_ip = '216.73.216.241'; private $_acceptLangs = FALSE; private $_baseUrl = ''; private $_pathInfo = '/a/1060000000368940'; private $_method = NULL; private $_requestUri = '/a/1060000000368940'; private $_requestRoot = NULL; private $_referer = NULL; private $_isSecure = NULL; private $_isMobile = NULL; private $_jsonParams = []; private $_params = ['id' => '1060000000368940']; private $_isCli = FALSE; private $_route = '/a/[id]' }, $response = class L8\Mvc\Response { private $_httpCode = [100 => 'Continue', 101 => 'Switching Protocols', 200 => 'OK', 201 => 'Created', 202 => 'Accepted', 203 => 'Non-Authoritative Information', 204 => 'No Content', 205 => 'Reset Content', 206 => 'Partial Content', 300 => 'Multiple Choices', 301 => 'Moved Permanently', 302 => 'Found', 303 => 'See Other', 304 => 'Not Modified', 305 => 'Use Proxy', 307 => 'Temporary Redirect', 400 => 'Bad Request', 401 => 'Unauthorized', 402 => 'Payment Required', 403 => 'Forbidden', 404 => 'Not Found', 405 => 'Method Not Allowed', 406 => 'Not Acceptable', 407 => 'Proxy Authentication Required', 408 => 'Request Timeout', 409 => 'Conflict', 410 => 'Gone', 411 => 'Length Required', 412 => 'Precondition Failed', 413 => 'Request Entity Too Large', 414 => 'Request-URI Too Long', 415 => 'Unsupported Media Type', 416 => 'Requested Range Not Satisfiable', 417 => 'Expectation Failed', 500 => 'Internal Server Error', 501 => 'Not Implemented', 502 => 'Bad Gateway', 503 => 'Service Unavailable', 504 => 'Gateway Timeout', 505 => 'HTTP Version Not Supported']; private $_cookies = [0 => [...]]; private $_statusCode = 200; private $_charset = 'UTF-8'; private $_contentType = 'text/html'; private $_headers = []; private $_result = class Ent\Result\Twig { private $_data = [...]; private $_template = 'article/detail.twig'; private ${L8\Mvc\Result\AbstractResult}_event = class L8\Mvc\Controller\ControllerEvent { ... } } }, $respond = ??? ).../Server.php:47
60.01331090352L8\Mvc\Response->respond( ).../Server.php:183
70.01331090584Ent\Result\Twig->render( ).../Response.php:149
80.01401132464Twig\Environment->display( $name = 'article/detail.twig', $context = ['article' => class Ent\Value\Article { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 0; private ${L8\Mvc\Value\AbstractValue}_length = 1; private ${L8\Mvc\Value\AbstractValue}_multi = FALSE; private $statusText = [...] }, 'title' => '实现扩展 external 能力的 Vite 插件', 'commentList' => class Ent\Value\Comment { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 0; private ${L8\Mvc\Value\AbstractValue}_length = 0; private ${L8\Mvc\Value\AbstractValue}_multi = TRUE }, 'excerpt' => '大家对构建工具中的 external 的属性一定不会陌生吧。在优化构建产物体积需求中可能会引入 CDN 来取代一些基础的模块或工具包,如 React、Vue、lodash 等。 最近没什么事情,闲余时间研究了下 Vite 和 Rollup 的内部实现,借此机会来探究下构建工具是如何处理 external 这一类外部链接的,并对 external 的能力做一些扩展。', 'relations' => class Ent\Value\Article { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 6; private ${L8\Mvc\Value\AbstractValue}_length = 6; private ${L8\Mvc\Value\AbstractValue}_multi = TRUE; private $statusText = [...] }, 'EntKeywords' => 'JavaScript', 'allowDownload' => FALSE, 'downloadLimitType' => 'task', 'pageName' => 'detail', 'wechatQrcode' => 'https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=gQEh8DwAAAAAAAAAAS5odHRwOi8vd2VpeGluLnFxLmNvbS9xLzAycllVQkFMREhjdkMxZXR5dk5IY3cAAgSdVfhqAwQAjScA', 'signPackage' => ['appId' => 'wxd2f93f15c9e73adc', 'nonceStr' => '3A4GzYklK63GvS0w', 'timestamp' => 1794665757, 'url' => 'https://community.aijishu.com/a/1060000000368940', 'signature' => '778175c753eb6f4cfe1ad8ede6c41f2df2efe818', 'rawString' => 'jsapi_ticket=LIKLckvwlJT9cWIhEQTwfOR0M1-ny5w7fa1RhaCvcWZR2Njwk3PPcRC19OHkZ7gPxHfTIZobf0nR9UJ9qb9XzQ&noncestr=3A4GzYklK63GvS0w&timestamp=1794665757&url=https://community.aijishu.com/a/1060000000368940'], 'CSRFToken' => '960b1880b17cea72effb77802c93435d', 'links' => class Ent\Value\Link { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 0; private ${L8\Mvc\Value\AbstractValue}_length = 22; private ${L8\Mvc\Value\AbstractValue}_multi = TRUE }, 'wxLogin' => 'https://open.weixin.qq.com/connect/qrconnect?appid=wx28bb22f416bf4d6b&redirect_uri=https%3A%2F%2Fcommunity.aijishu.com%2Fuser%2Foauth%2Fwechat&scope=snsapi_login&self_redirect=false&login_type=jssdk&style=dark&https://cdn-assets.aijishu.com/v-29880a42/public/wx-qrcode.css', 'wxLoginParams' => ['id' => 'wx-login-qrcode', 'appid' => 'wx28bb22f416bf4d6b', 'scope' => 'snsapi_login', 'redirect_uri' => 'https%3A%2F%2Fcommunity.aijishu.com%2Fuser%2Foauth%2Fwechat', 'state' => '', 'style' => 'dark', 'href' => 'https://cdn-assets.aijishu.com/v-29880a42/public/wx-qrcode.css']] ).../Twig.php:58
90.01421141448Twig\TemplateWrapper->display( $context = ['article' => class Ent\Value\Article { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 0; private ${L8\Mvc\Value\AbstractValue}_length = 1; private ${L8\Mvc\Value\AbstractValue}_multi = FALSE; private $statusText = [...] }, 'title' => '实现扩展 external 能力的 Vite 插件', 'commentList' => class Ent\Value\Comment { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 0; private ${L8\Mvc\Value\AbstractValue}_length = 0; private ${L8\Mvc\Value\AbstractValue}_multi = TRUE }, 'excerpt' => '大家对构建工具中的 external 的属性一定不会陌生吧。在优化构建产物体积需求中可能会引入 CDN 来取代一些基础的模块或工具包,如 React、Vue、lodash 等。 最近没什么事情,闲余时间研究了下 Vite 和 Rollup 的内部实现,借此机会来探究下构建工具是如何处理 external 这一类外部链接的,并对 external 的能力做一些扩展。', 'relations' => class Ent\Value\Article { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 6; private ${L8\Mvc\Value\AbstractValue}_length = 6; private ${L8\Mvc\Value\AbstractValue}_multi = TRUE; private $statusText = [...] }, 'EntKeywords' => 'JavaScript', 'allowDownload' => FALSE, 'downloadLimitType' => 'task', 'pageName' => 'detail', 'wechatQrcode' => 'https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=gQEh8DwAAAAAAAAAAS5odHRwOi8vd2VpeGluLnFxLmNvbS9xLzAycllVQkFMREhjdkMxZXR5dk5IY3cAAgSdVfhqAwQAjScA', 'signPackage' => ['appId' => 'wxd2f93f15c9e73adc', 'nonceStr' => '3A4GzYklK63GvS0w', 'timestamp' => 1794665757, 'url' => 'https://community.aijishu.com/a/1060000000368940', 'signature' => '778175c753eb6f4cfe1ad8ede6c41f2df2efe818', 'rawString' => 'jsapi_ticket=LIKLckvwlJT9cWIhEQTwfOR0M1-ny5w7fa1RhaCvcWZR2Njwk3PPcRC19OHkZ7gPxHfTIZobf0nR9UJ9qb9XzQ&noncestr=3A4GzYklK63GvS0w&timestamp=1794665757&url=https://community.aijishu.com/a/1060000000368940'], 'CSRFToken' => '960b1880b17cea72effb77802c93435d', 'links' => class Ent\Value\Link { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 0; private ${L8\Mvc\Value\AbstractValue}_length = 22; private ${L8\Mvc\Value\AbstractValue}_multi = TRUE }, 'wxLogin' => 'https://open.weixin.qq.com/connect/qrconnect?appid=wx28bb22f416bf4d6b&redirect_uri=https%3A%2F%2Fcommunity.aijishu.com%2Fuser%2Foauth%2Fwechat&scope=snsapi_login&self_redirect=false&login_type=jssdk&style=dark&https://cdn-assets.aijishu.com/v-29880a42/public/wx-qrcode.css', 'wxLoginParams' => ['id' => 'wx-login-qrcode', 'appid' => 'wx28bb22f416bf4d6b', 'scope' => 'snsapi_login', 'redirect_uri' => 'https%3A%2F%2Fcommunity.aijishu.com%2Fuser%2Foauth%2Fwechat', 'state' => '', 'style' => 'dark', 'href' => 'https://cdn-assets.aijishu.com/v-29880a42/public/wx-qrcode.css']] ).../Environment.php:291
100.01421141448Twig\Template->display( $context = ['article' => class Ent\Value\Article { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 0; private ${L8\Mvc\Value\AbstractValue}_length = 1; private ${L8\Mvc\Value\AbstractValue}_multi = FALSE; private $statusText = [...] }, 'title' => '实现扩展 external 能力的 Vite 插件', 'commentList' => class Ent\Value\Comment { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 0; private ${L8\Mvc\Value\AbstractValue}_length = 0; private ${L8\Mvc\Value\AbstractValue}_multi = TRUE }, 'excerpt' => '大家对构建工具中的 external 的属性一定不会陌生吧。在优化构建产物体积需求中可能会引入 CDN 来取代一些基础的模块或工具包,如 React、Vue、lodash 等。 最近没什么事情,闲余时间研究了下 Vite 和 Rollup 的内部实现,借此机会来探究下构建工具是如何处理 external 这一类外部链接的,并对 external 的能力做一些扩展。', 'relations' => class Ent\Value\Article { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 6; private ${L8\Mvc\Value\AbstractValue}_length = 6; private ${L8\Mvc\Value\AbstractValue}_multi = TRUE; private $statusText = [...] }, 'EntKeywords' => 'JavaScript', 'allowDownload' => FALSE, 'downloadLimitType' => 'task', 'pageName' => 'detail', 'wechatQrcode' => 'https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=gQEh8DwAAAAAAAAAAS5odHRwOi8vd2VpeGluLnFxLmNvbS9xLzAycllVQkFMREhjdkMxZXR5dk5IY3cAAgSdVfhqAwQAjScA', 'signPackage' => ['appId' => 'wxd2f93f15c9e73adc', 'nonceStr' => '3A4GzYklK63GvS0w', 'timestamp' => 1794665757, 'url' => 'https://community.aijishu.com/a/1060000000368940', 'signature' => '778175c753eb6f4cfe1ad8ede6c41f2df2efe818', 'rawString' => 'jsapi_ticket=LIKLckvwlJT9cWIhEQTwfOR0M1-ny5w7fa1RhaCvcWZR2Njwk3PPcRC19OHkZ7gPxHfTIZobf0nR9UJ9qb9XzQ&noncestr=3A4GzYklK63GvS0w&timestamp=1794665757&url=https://community.aijishu.com/a/1060000000368940'], 'CSRFToken' => '960b1880b17cea72effb77802c93435d', 'links' => class Ent\Value\Link { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 0; private ${L8\Mvc\Value\AbstractValue}_length = 22; private ${L8\Mvc\Value\AbstractValue}_multi = TRUE }, 'wxLogin' => 'https://open.weixin.qq.com/connect/qrconnect?appid=wx28bb22f416bf4d6b&redirect_uri=https%3A%2F%2Fcommunity.aijishu.com%2Fuser%2Foauth%2Fwechat&scope=snsapi_login&self_redirect=false&login_type=jssdk&style=dark&https://cdn-assets.aijishu.com/v-29880a42/public/wx-qrcode.css', 'wxLoginParams' => ['id' => 'wx-login-qrcode', 'appid' => 'wx28bb22f416bf4d6b', 'scope' => 'snsapi_login', 'redirect_uri' => 'https%3A%2F%2Fcommunity.aijishu.com%2Fuser%2Foauth%2Fwechat', 'state' => '', 'style' => 'dark', 'href' => 'https://cdn-assets.aijishu.com/v-29880a42/public/wx-qrcode.css']], $blocks = [] ).../TemplateWrapper.php:47
110.01421141448Twig\Template->displayWithErrorHandling( $context = ['article' => class Ent\Value\Article { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 0; private ${L8\Mvc\Value\AbstractValue}_length = 1; private ${L8\Mvc\Value\AbstractValue}_multi = FALSE; private $statusText = [...] }, 'title' => '实现扩展 external 能力的 Vite 插件', 'commentList' => class Ent\Value\Comment { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 0; private ${L8\Mvc\Value\AbstractValue}_length = 0; private ${L8\Mvc\Value\AbstractValue}_multi = TRUE }, 'excerpt' => '大家对构建工具中的 external 的属性一定不会陌生吧。在优化构建产物体积需求中可能会引入 CDN 来取代一些基础的模块或工具包,如 React、Vue、lodash 等。 最近没什么事情,闲余时间研究了下 Vite 和 Rollup 的内部实现,借此机会来探究下构建工具是如何处理 external 这一类外部链接的,并对 external 的能力做一些扩展。', 'relations' => class Ent\Value\Article { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 6; private ${L8\Mvc\Value\AbstractValue}_length = 6; private ${L8\Mvc\Value\AbstractValue}_multi = TRUE; private $statusText = [...] }, 'EntKeywords' => 'JavaScript', 'allowDownload' => FALSE, 'downloadLimitType' => 'task', 'pageName' => 'detail', 'wechatQrcode' => 'https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=gQEh8DwAAAAAAAAAAS5odHRwOi8vd2VpeGluLnFxLmNvbS9xLzAycllVQkFMREhjdkMxZXR5dk5IY3cAAgSdVfhqAwQAjScA', 'signPackage' => ['appId' => 'wxd2f93f15c9e73adc', 'nonceStr' => '3A4GzYklK63GvS0w', 'timestamp' => 1794665757, 'url' => 'https://community.aijishu.com/a/1060000000368940', 'signature' => '778175c753eb6f4cfe1ad8ede6c41f2df2efe818', 'rawString' => 'jsapi_ticket=LIKLckvwlJT9cWIhEQTwfOR0M1-ny5w7fa1RhaCvcWZR2Njwk3PPcRC19OHkZ7gPxHfTIZobf0nR9UJ9qb9XzQ&noncestr=3A4GzYklK63GvS0w&timestamp=1794665757&url=https://community.aijishu.com/a/1060000000368940'], 'CSRFToken' => '960b1880b17cea72effb77802c93435d', 'links' => class Ent\Value\Link { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 0; private ${L8\Mvc\Value\AbstractValue}_length = 22; private ${L8\Mvc\Value\AbstractValue}_multi = TRUE }, 'wxLogin' => 'https://open.weixin.qq.com/connect/qrconnect?appid=wx28bb22f416bf4d6b&redirect_uri=https%3A%2F%2Fcommunity.aijishu.com%2Fuser%2Foauth%2Fwechat&scope=snsapi_login&self_redirect=false&login_type=jssdk&style=dark&https://cdn-assets.aijishu.com/v-29880a42/public/wx-qrcode.css', 'wxLoginParams' => ['id' => 'wx-login-qrcode', 'appid' => 'wx28bb22f416bf4d6b', 'scope' => 'snsapi_login', 'redirect_uri' => 'https%3A%2F%2Fcommunity.aijishu.com%2Fuser%2Foauth%2Fwechat', 'state' => '', 'style' => 'dark', 'href' => 'https://cdn-assets.aijishu.com/v-29880a42/public/wx-qrcode.css']], $blocks = ['main' => [0 => class __TwigTemplate_4e1c94b12692330a0be02a0a30ed84d76a3eb1de7ec5852532698a907f6a2fbc { ... }, 1 => 'block_main'], 'footer' => [0 => class __TwigTemplate_4e1c94b12692330a0be02a0a30ed84d76a3eb1de7ec5852532698a907f6a2fbc { ... }, 1 => 'block_footer']] ).../Template.php:369
120.01421141448__TwigTemplate_4e1c94b12692330a0be02a0a30ed84d76a3eb1de7ec5852532698a907f6a2fbc->doDisplay( $context = ['article' => class Ent\Value\Article { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 0; private ${L8\Mvc\Value\AbstractValue}_length = 1; private ${L8\Mvc\Value\AbstractValue}_multi = FALSE; private $statusText = [...] }, 'title' => '实现扩展 external 能力的 Vite 插件', 'commentList' => class Ent\Value\Comment { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 0; private ${L8\Mvc\Value\AbstractValue}_length = 0; private ${L8\Mvc\Value\AbstractValue}_multi = TRUE }, 'excerpt' => '大家对构建工具中的 external 的属性一定不会陌生吧。在优化构建产物体积需求中可能会引入 CDN 来取代一些基础的模块或工具包,如 React、Vue、lodash 等。 最近没什么事情,闲余时间研究了下 Vite 和 Rollup 的内部实现,借此机会来探究下构建工具是如何处理 external 这一类外部链接的,并对 external 的能力做一些扩展。', 'relations' => class Ent\Value\Article { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 6; private ${L8\Mvc\Value\AbstractValue}_length = 6; private ${L8\Mvc\Value\AbstractValue}_multi = TRUE; private $statusText = [...] }, 'EntKeywords' => 'JavaScript', 'allowDownload' => FALSE, 'downloadLimitType' => 'task', 'pageName' => 'detail', 'wechatQrcode' => 'https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=gQEh8DwAAAAAAAAAAS5odHRwOi8vd2VpeGluLnFxLmNvbS9xLzAycllVQkFMREhjdkMxZXR5dk5IY3cAAgSdVfhqAwQAjScA', 'signPackage' => ['appId' => 'wxd2f93f15c9e73adc', 'nonceStr' => '3A4GzYklK63GvS0w', 'timestamp' => 1794665757, 'url' => 'https://community.aijishu.com/a/1060000000368940', 'signature' => '778175c753eb6f4cfe1ad8ede6c41f2df2efe818', 'rawString' => 'jsapi_ticket=LIKLckvwlJT9cWIhEQTwfOR0M1-ny5w7fa1RhaCvcWZR2Njwk3PPcRC19OHkZ7gPxHfTIZobf0nR9UJ9qb9XzQ&noncestr=3A4GzYklK63GvS0w&timestamp=1794665757&url=https://community.aijishu.com/a/1060000000368940'], 'CSRFToken' => '960b1880b17cea72effb77802c93435d', 'links' => class Ent\Value\Link { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 0; private ${L8\Mvc\Value\AbstractValue}_length = 22; private ${L8\Mvc\Value\AbstractValue}_multi = TRUE }, 'wxLogin' => 'https://open.weixin.qq.com/connect/qrconnect?appid=wx28bb22f416bf4d6b&redirect_uri=https%3A%2F%2Fcommunity.aijishu.com%2Fuser%2Foauth%2Fwechat&scope=snsapi_login&self_redirect=false&login_type=jssdk&style=dark&https://cdn-assets.aijishu.com/v-29880a42/public/wx-qrcode.css', 'wxLoginParams' => ['id' => 'wx-login-qrcode', 'appid' => 'wx28bb22f416bf4d6b', 'scope' => 'snsapi_login', 'redirect_uri' => 'https%3A%2F%2Fcommunity.aijishu.com%2Fuser%2Foauth%2Fwechat', 'state' => '', 'style' => 'dark', 'href' => 'https://cdn-assets.aijishu.com/v-29880a42/public/wx-qrcode.css']], $blocks = ['main' => [0 => class __TwigTemplate_4e1c94b12692330a0be02a0a30ed84d76a3eb1de7ec5852532698a907f6a2fbc { ... }, 1 => 'block_main'], 'footer' => [0 => class __TwigTemplate_4e1c94b12692330a0be02a0a30ed84d76a3eb1de7ec5852532698a907f6a2fbc { ... }, 1 => 'block_footer']] ).../Template.php:396
130.01451153208Twig\Template->display( $context = ['article' => class Ent\Value\Article { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 0; private ${L8\Mvc\Value\AbstractValue}_length = 1; private ${L8\Mvc\Value\AbstractValue}_multi = FALSE; private $statusText = [...] }, 'title' => '实现扩展 external 能力的 Vite 插件', 'commentList' => class Ent\Value\Comment { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 0; private ${L8\Mvc\Value\AbstractValue}_length = 0; private ${L8\Mvc\Value\AbstractValue}_multi = TRUE }, 'excerpt' => '大家对构建工具中的 external 的属性一定不会陌生吧。在优化构建产物体积需求中可能会引入 CDN 来取代一些基础的模块或工具包,如 React、Vue、lodash 等。 最近没什么事情,闲余时间研究了下 Vite 和 Rollup 的内部实现,借此机会来探究下构建工具是如何处理 external 这一类外部链接的,并对 external 的能力做一些扩展。', 'relations' => class Ent\Value\Article { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 6; private ${L8\Mvc\Value\AbstractValue}_length = 6; private ${L8\Mvc\Value\AbstractValue}_multi = TRUE; private $statusText = [...] }, 'EntKeywords' => 'JavaScript', 'allowDownload' => FALSE, 'downloadLimitType' => 'task', 'pageName' => 'detail', 'wechatQrcode' => 'https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=gQEh8DwAAAAAAAAAAS5odHRwOi8vd2VpeGluLnFxLmNvbS9xLzAycllVQkFMREhjdkMxZXR5dk5IY3cAAgSdVfhqAwQAjScA', 'signPackage' => ['appId' => 'wxd2f93f15c9e73adc', 'nonceStr' => '3A4GzYklK63GvS0w', 'timestamp' => 1794665757, 'url' => 'https://community.aijishu.com/a/1060000000368940', 'signature' => '778175c753eb6f4cfe1ad8ede6c41f2df2efe818', 'rawString' => 'jsapi_ticket=LIKLckvwlJT9cWIhEQTwfOR0M1-ny5w7fa1RhaCvcWZR2Njwk3PPcRC19OHkZ7gPxHfTIZobf0nR9UJ9qb9XzQ&noncestr=3A4GzYklK63GvS0w&timestamp=1794665757&url=https://community.aijishu.com/a/1060000000368940'], 'CSRFToken' => '960b1880b17cea72effb77802c93435d', 'links' => class Ent\Value\Link { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 0; private ${L8\Mvc\Value\AbstractValue}_length = 22; private ${L8\Mvc\Value\AbstractValue}_multi = TRUE }, 'wxLogin' => 'https://open.weixin.qq.com/connect/qrconnect?appid=wx28bb22f416bf4d6b&redirect_uri=https%3A%2F%2Fcommunity.aijishu.com%2Fuser%2Foauth%2Fwechat&scope=snsapi_login&self_redirect=false&login_type=jssdk&style=dark&https://cdn-assets.aijishu.com/v-29880a42/public/wx-qrcode.css', 'wxLoginParams' => ['id' => 'wx-login-qrcode', 'appid' => 'wx28bb22f416bf4d6b', 'scope' => 'snsapi_login', 'redirect_uri' => 'https%3A%2F%2Fcommunity.aijishu.com%2Fuser%2Foauth%2Fwechat', 'state' => '', 'style' => 'dark', 'href' => 'https://cdn-assets.aijishu.com/v-29880a42/public/wx-qrcode.css'], 'moduleName' => 'article', 'EntDescription' => '大家对构建工具中的 external 的属性一定不会陌生吧。在优化构建产物体积需求中可能会引入 CDN 来取代一些基础的模块或工具包,如 React、Vue、lodash 等。 最近没什么事情,闲余时间研究了下 Vite 和 Rollup 的内部实现,借此机会来探究下构建工具是如何处理 external 这一类外部链接的,并对 external 的能力做一些扩展。'], $blocks = ['main' => [0 => class __TwigTemplate_4e1c94b12692330a0be02a0a30ed84d76a3eb1de7ec5852532698a907f6a2fbc { ... }, 1 => 'block_main'], 'footer' => [0 => class __TwigTemplate_4e1c94b12692330a0be02a0a30ed84d76a3eb1de7ec5852532698a907f6a2fbc { ... }, 1 => 'block_footer']] ).../991b880de2992dd600c40ca80c7a70708f2b669e843c19fe638175d0f1974d4a.php:50
140.01451153584Twig\Template->displayWithErrorHandling( $context = ['article' => class Ent\Value\Article { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 0; private ${L8\Mvc\Value\AbstractValue}_length = 1; private ${L8\Mvc\Value\AbstractValue}_multi = FALSE; private $statusText = [...] }, 'title' => '实现扩展 external 能力的 Vite 插件', 'commentList' => class Ent\Value\Comment { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 0; private ${L8\Mvc\Value\AbstractValue}_length = 0; private ${L8\Mvc\Value\AbstractValue}_multi = TRUE }, 'excerpt' => '大家对构建工具中的 external 的属性一定不会陌生吧。在优化构建产物体积需求中可能会引入 CDN 来取代一些基础的模块或工具包,如 React、Vue、lodash 等。 最近没什么事情,闲余时间研究了下 Vite 和 Rollup 的内部实现,借此机会来探究下构建工具是如何处理 external 这一类外部链接的,并对 external 的能力做一些扩展。', 'relations' => class Ent\Value\Article { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 6; private ${L8\Mvc\Value\AbstractValue}_length = 6; private ${L8\Mvc\Value\AbstractValue}_multi = TRUE; private $statusText = [...] }, 'EntKeywords' => 'JavaScript', 'allowDownload' => FALSE, 'downloadLimitType' => 'task', 'pageName' => 'detail', 'wechatQrcode' => 'https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=gQEh8DwAAAAAAAAAAS5odHRwOi8vd2VpeGluLnFxLmNvbS9xLzAycllVQkFMREhjdkMxZXR5dk5IY3cAAgSdVfhqAwQAjScA', 'signPackage' => ['appId' => 'wxd2f93f15c9e73adc', 'nonceStr' => '3A4GzYklK63GvS0w', 'timestamp' => 1794665757, 'url' => 'https://community.aijishu.com/a/1060000000368940', 'signature' => '778175c753eb6f4cfe1ad8ede6c41f2df2efe818', 'rawString' => 'jsapi_ticket=LIKLckvwlJT9cWIhEQTwfOR0M1-ny5w7fa1RhaCvcWZR2Njwk3PPcRC19OHkZ7gPxHfTIZobf0nR9UJ9qb9XzQ&noncestr=3A4GzYklK63GvS0w&timestamp=1794665757&url=https://community.aijishu.com/a/1060000000368940'], 'CSRFToken' => '960b1880b17cea72effb77802c93435d', 'links' => class Ent\Value\Link { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 0; private ${L8\Mvc\Value\AbstractValue}_length = 22; private ${L8\Mvc\Value\AbstractValue}_multi = TRUE }, 'wxLogin' => 'https://open.weixin.qq.com/connect/qrconnect?appid=wx28bb22f416bf4d6b&redirect_uri=https%3A%2F%2Fcommunity.aijishu.com%2Fuser%2Foauth%2Fwechat&scope=snsapi_login&self_redirect=false&login_type=jssdk&style=dark&https://cdn-assets.aijishu.com/v-29880a42/public/wx-qrcode.css', 'wxLoginParams' => ['id' => 'wx-login-qrcode', 'appid' => 'wx28bb22f416bf4d6b', 'scope' => 'snsapi_login', 'redirect_uri' => 'https%3A%2F%2Fcommunity.aijishu.com%2Fuser%2Foauth%2Fwechat', 'state' => '', 'style' => 'dark', 'href' => 'https://cdn-assets.aijishu.com/v-29880a42/public/wx-qrcode.css'], 'moduleName' => 'article', 'EntDescription' => '大家对构建工具中的 external 的属性一定不会陌生吧。在优化构建产物体积需求中可能会引入 CDN 来取代一些基础的模块或工具包,如 React、Vue、lodash 等。 最近没什么事情,闲余时间研究了下 Vite 和 Rollup 的内部实现,借此机会来探究下构建工具是如何处理 external 这一类外部链接的,并对 external 的能力做一些扩展。'], $blocks = ['head' => [0 => class __TwigTemplate_734d14ec28470defff3c4c29d599878cd0e3e81ebb74cc8775eed266b9c666e9 { ... }, 1 => 'block_head'], 'header' => [0 => class __TwigTemplate_734d14ec28470defff3c4c29d599878cd0e3e81ebb74cc8775eed266b9c666e9 { ... }, 1 => 'block_header'], 'main' => [0 => class __TwigTemplate_4e1c94b12692330a0be02a0a30ed84d76a3eb1de7ec5852532698a907f6a2fbc { ... }, 1 => 'block_main'], 'footer' => [0 => class __TwigTemplate_4e1c94b12692330a0be02a0a30ed84d76a3eb1de7ec5852532698a907f6a2fbc { ... }, 1 => 'block_footer']] ).../Template.php:369
150.01451153584__TwigTemplate_734d14ec28470defff3c4c29d599878cd0e3e81ebb74cc8775eed266b9c666e9->doDisplay( $context = ['article' => class Ent\Value\Article { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 0; private ${L8\Mvc\Value\AbstractValue}_length = 1; private ${L8\Mvc\Value\AbstractValue}_multi = FALSE; private $statusText = [...] }, 'title' => '实现扩展 external 能力的 Vite 插件', 'commentList' => class Ent\Value\Comment { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 0; private ${L8\Mvc\Value\AbstractValue}_length = 0; private ${L8\Mvc\Value\AbstractValue}_multi = TRUE }, 'excerpt' => '大家对构建工具中的 external 的属性一定不会陌生吧。在优化构建产物体积需求中可能会引入 CDN 来取代一些基础的模块或工具包,如 React、Vue、lodash 等。 最近没什么事情,闲余时间研究了下 Vite 和 Rollup 的内部实现,借此机会来探究下构建工具是如何处理 external 这一类外部链接的,并对 external 的能力做一些扩展。', 'relations' => class Ent\Value\Article { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 6; private ${L8\Mvc\Value\AbstractValue}_length = 6; private ${L8\Mvc\Value\AbstractValue}_multi = TRUE; private $statusText = [...] }, 'EntKeywords' => 'JavaScript', 'allowDownload' => FALSE, 'downloadLimitType' => 'task', 'pageName' => 'detail', 'wechatQrcode' => 'https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=gQEh8DwAAAAAAAAAAS5odHRwOi8vd2VpeGluLnFxLmNvbS9xLzAycllVQkFMREhjdkMxZXR5dk5IY3cAAgSdVfhqAwQAjScA', 'signPackage' => ['appId' => 'wxd2f93f15c9e73adc', 'nonceStr' => '3A4GzYklK63GvS0w', 'timestamp' => 1794665757, 'url' => 'https://community.aijishu.com/a/1060000000368940', 'signature' => '778175c753eb6f4cfe1ad8ede6c41f2df2efe818', 'rawString' => 'jsapi_ticket=LIKLckvwlJT9cWIhEQTwfOR0M1-ny5w7fa1RhaCvcWZR2Njwk3PPcRC19OHkZ7gPxHfTIZobf0nR9UJ9qb9XzQ&noncestr=3A4GzYklK63GvS0w&timestamp=1794665757&url=https://community.aijishu.com/a/1060000000368940'], 'CSRFToken' => '960b1880b17cea72effb77802c93435d', 'links' => class Ent\Value\Link { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 0; private ${L8\Mvc\Value\AbstractValue}_length = 22; private ${L8\Mvc\Value\AbstractValue}_multi = TRUE }, 'wxLogin' => 'https://open.weixin.qq.com/connect/qrconnect?appid=wx28bb22f416bf4d6b&redirect_uri=https%3A%2F%2Fcommunity.aijishu.com%2Fuser%2Foauth%2Fwechat&scope=snsapi_login&self_redirect=false&login_type=jssdk&style=dark&https://cdn-assets.aijishu.com/v-29880a42/public/wx-qrcode.css', 'wxLoginParams' => ['id' => 'wx-login-qrcode', 'appid' => 'wx28bb22f416bf4d6b', 'scope' => 'snsapi_login', 'redirect_uri' => 'https%3A%2F%2Fcommunity.aijishu.com%2Fuser%2Foauth%2Fwechat', 'state' => '', 'style' => 'dark', 'href' => 'https://cdn-assets.aijishu.com/v-29880a42/public/wx-qrcode.css'], 'moduleName' => 'article', 'EntDescription' => '大家对构建工具中的 external 的属性一定不会陌生吧。在优化构建产物体积需求中可能会引入 CDN 来取代一些基础的模块或工具包,如 React、Vue、lodash 等。 最近没什么事情,闲余时间研究了下 Vite 和 Rollup 的内部实现,借此机会来探究下构建工具是如何处理 external 这一类外部链接的,并对 external 的能力做一些扩展。'], $blocks = ['head' => [0 => class __TwigTemplate_734d14ec28470defff3c4c29d599878cd0e3e81ebb74cc8775eed266b9c666e9 { ... }, 1 => 'block_head'], 'header' => [0 => class __TwigTemplate_734d14ec28470defff3c4c29d599878cd0e3e81ebb74cc8775eed266b9c666e9 { ... }, 1 => 'block_header'], 'main' => [0 => class __TwigTemplate_4e1c94b12692330a0be02a0a30ed84d76a3eb1de7ec5852532698a907f6a2fbc { ... }, 1 => 'block_main'], 'footer' => [0 => class __TwigTemplate_4e1c94b12692330a0be02a0a30ed84d76a3eb1de7ec5852532698a907f6a2fbc { ... }, 1 => 'block_footer']] ).../Template.php:396
160.01571280496Twig\Template->displayBlock( $name = 'main', $context = ['article' => class Ent\Value\Article { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 0; private ${L8\Mvc\Value\AbstractValue}_length = 1; private ${L8\Mvc\Value\AbstractValue}_multi = FALSE; private $statusText = [...] }, 'title' => '实现扩展 external 能力的 Vite 插件', 'commentList' => class Ent\Value\Comment { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 0; private ${L8\Mvc\Value\AbstractValue}_length = 0; private ${L8\Mvc\Value\AbstractValue}_multi = TRUE }, 'excerpt' => '大家对构建工具中的 external 的属性一定不会陌生吧。在优化构建产物体积需求中可能会引入 CDN 来取代一些基础的模块或工具包,如 React、Vue、lodash 等。 最近没什么事情,闲余时间研究了下 Vite 和 Rollup 的内部实现,借此机会来探究下构建工具是如何处理 external 这一类外部链接的,并对 external 的能力做一些扩展。', 'relations' => class Ent\Value\Article { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 6; private ${L8\Mvc\Value\AbstractValue}_length = 6; private ${L8\Mvc\Value\AbstractValue}_multi = TRUE; private $statusText = [...] }, 'EntKeywords' => 'JavaScript', 'allowDownload' => FALSE, 'downloadLimitType' => 'task', 'pageName' => 'detail', 'wechatQrcode' => 'https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=gQEh8DwAAAAAAAAAAS5odHRwOi8vd2VpeGluLnFxLmNvbS9xLzAycllVQkFMREhjdkMxZXR5dk5IY3cAAgSdVfhqAwQAjScA', 'signPackage' => ['appId' => 'wxd2f93f15c9e73adc', 'nonceStr' => '3A4GzYklK63GvS0w', 'timestamp' => 1794665757, 'url' => 'https://community.aijishu.com/a/1060000000368940', 'signature' => '778175c753eb6f4cfe1ad8ede6c41f2df2efe818', 'rawString' => 'jsapi_ticket=LIKLckvwlJT9cWIhEQTwfOR0M1-ny5w7fa1RhaCvcWZR2Njwk3PPcRC19OHkZ7gPxHfTIZobf0nR9UJ9qb9XzQ&noncestr=3A4GzYklK63GvS0w&timestamp=1794665757&url=https://community.aijishu.com/a/1060000000368940'], 'CSRFToken' => '960b1880b17cea72effb77802c93435d', 'links' => class Ent\Value\Link { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 0; private ${L8\Mvc\Value\AbstractValue}_length = 22; private ${L8\Mvc\Value\AbstractValue}_multi = TRUE }, 'wxLogin' => 'https://open.weixin.qq.com/connect/qrconnect?appid=wx28bb22f416bf4d6b&redirect_uri=https%3A%2F%2Fcommunity.aijishu.com%2Fuser%2Foauth%2Fwechat&scope=snsapi_login&self_redirect=false&login_type=jssdk&style=dark&https://cdn-assets.aijishu.com/v-29880a42/public/wx-qrcode.css', 'wxLoginParams' => ['id' => 'wx-login-qrcode', 'appid' => 'wx28bb22f416bf4d6b', 'scope' => 'snsapi_login', 'redirect_uri' => 'https%3A%2F%2Fcommunity.aijishu.com%2Fuser%2Foauth%2Fwechat', 'state' => '', 'style' => 'dark', 'href' => 'https://cdn-assets.aijishu.com/v-29880a42/public/wx-qrcode.css'], 'moduleName' => 'article', 'EntDescription' => '大家对构建工具中的 external 的属性一定不会陌生吧。在优化构建产物体积需求中可能会引入 CDN 来取代一些基础的模块或工具包,如 React、Vue、lodash 等。 最近没什么事情,闲余时间研究了下 Vite 和 Rollup 的内部实现,借此机会来探究下构建工具是如何处理 external 这一类外部链接的,并对 external 的能力做一些扩展。'], $blocks = ['head' => [0 => class __TwigTemplate_734d14ec28470defff3c4c29d599878cd0e3e81ebb74cc8775eed266b9c666e9 { ... }, 1 => 'block_head'], 'header' => [0 => class __TwigTemplate_734d14ec28470defff3c4c29d599878cd0e3e81ebb74cc8775eed266b9c666e9 { ... }, 1 => 'block_header'], 'main' => [0 => class __TwigTemplate_4e1c94b12692330a0be02a0a30ed84d76a3eb1de7ec5852532698a907f6a2fbc { ... }, 1 => 'block_main'], 'footer' => [0 => class __TwigTemplate_4e1c94b12692330a0be02a0a30ed84d76a3eb1de7ec5852532698a907f6a2fbc { ... }, 1 => 'block_footer']], $useBlocks = ???, $templateContext = ??? ).../f77986c6d314722d2bfbb68da2fbb8f507d9b67c5b20e33c3a5ae3096f711a30.php:207
170.01571280496__TwigTemplate_4e1c94b12692330a0be02a0a30ed84d76a3eb1de7ec5852532698a907f6a2fbc->block_main( $context = ['article' => class Ent\Value\Article { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 0; private ${L8\Mvc\Value\AbstractValue}_length = 1; private ${L8\Mvc\Value\AbstractValue}_multi = FALSE; private $statusText = [...] }, 'title' => '实现扩展 external 能力的 Vite 插件', 'commentList' => class Ent\Value\Comment { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 0; private ${L8\Mvc\Value\AbstractValue}_length = 0; private ${L8\Mvc\Value\AbstractValue}_multi = TRUE }, 'excerpt' => '大家对构建工具中的 external 的属性一定不会陌生吧。在优化构建产物体积需求中可能会引入 CDN 来取代一些基础的模块或工具包,如 React、Vue、lodash 等。 最近没什么事情,闲余时间研究了下 Vite 和 Rollup 的内部实现,借此机会来探究下构建工具是如何处理 external 这一类外部链接的,并对 external 的能力做一些扩展。', 'relations' => class Ent\Value\Article { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 6; private ${L8\Mvc\Value\AbstractValue}_length = 6; private ${L8\Mvc\Value\AbstractValue}_multi = TRUE; private $statusText = [...] }, 'EntKeywords' => 'JavaScript', 'allowDownload' => FALSE, 'downloadLimitType' => 'task', 'pageName' => 'detail', 'wechatQrcode' => 'https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=gQEh8DwAAAAAAAAAAS5odHRwOi8vd2VpeGluLnFxLmNvbS9xLzAycllVQkFMREhjdkMxZXR5dk5IY3cAAgSdVfhqAwQAjScA', 'signPackage' => ['appId' => 'wxd2f93f15c9e73adc', 'nonceStr' => '3A4GzYklK63GvS0w', 'timestamp' => 1794665757, 'url' => 'https://community.aijishu.com/a/1060000000368940', 'signature' => '778175c753eb6f4cfe1ad8ede6c41f2df2efe818', 'rawString' => 'jsapi_ticket=LIKLckvwlJT9cWIhEQTwfOR0M1-ny5w7fa1RhaCvcWZR2Njwk3PPcRC19OHkZ7gPxHfTIZobf0nR9UJ9qb9XzQ&noncestr=3A4GzYklK63GvS0w&timestamp=1794665757&url=https://community.aijishu.com/a/1060000000368940'], 'CSRFToken' => '960b1880b17cea72effb77802c93435d', 'links' => class Ent\Value\Link { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 0; private ${L8\Mvc\Value\AbstractValue}_length = 22; private ${L8\Mvc\Value\AbstractValue}_multi = TRUE }, 'wxLogin' => 'https://open.weixin.qq.com/connect/qrconnect?appid=wx28bb22f416bf4d6b&redirect_uri=https%3A%2F%2Fcommunity.aijishu.com%2Fuser%2Foauth%2Fwechat&scope=snsapi_login&self_redirect=false&login_type=jssdk&style=dark&https://cdn-assets.aijishu.com/v-29880a42/public/wx-qrcode.css', 'wxLoginParams' => ['id' => 'wx-login-qrcode', 'appid' => 'wx28bb22f416bf4d6b', 'scope' => 'snsapi_login', 'redirect_uri' => 'https%3A%2F%2Fcommunity.aijishu.com%2Fuser%2Foauth%2Fwechat', 'state' => '', 'style' => 'dark', 'href' => 'https://cdn-assets.aijishu.com/v-29880a42/public/wx-qrcode.css'], 'moduleName' => 'article', 'EntDescription' => '大家对构建工具中的 external 的属性一定不会陌生吧。在优化构建产物体积需求中可能会引入 CDN 来取代一些基础的模块或工具包,如 React、Vue、lodash 等。 最近没什么事情,闲余时间研究了下 Vite 和 Rollup 的内部实现,借此机会来探究下构建工具是如何处理 external 这一类外部链接的,并对 external 的能力做一些扩展。'], $blocks = ['head' => [0 => class __TwigTemplate_734d14ec28470defff3c4c29d599878cd0e3e81ebb74cc8775eed266b9c666e9 { ... }, 1 => 'block_head'], 'header' => [0 => class __TwigTemplate_734d14ec28470defff3c4c29d599878cd0e3e81ebb74cc8775eed266b9c666e9 { ... }, 1 => 'block_header'], 'main' => [0 => class __TwigTemplate_4e1c94b12692330a0be02a0a30ed84d76a3eb1de7ec5852532698a907f6a2fbc { ... }, 1 => 'block_main'], 'footer' => [0 => class __TwigTemplate_4e1c94b12692330a0be02a0a30ed84d76a3eb1de7ec5852532698a907f6a2fbc { ... }, 1 => 'block_footer']] ).../Template.php:173
180.01931365952twig_call_macro( $template = class __TwigTemplate_f886f99fcc833337a140021267c2ff818541876872dbdc8ce9d3901c7a7f353d { private $source = class Twig\Source { private $code = ''; private $name = 'common/macro.twig'; private $path = '/Data/webapps/aijishu/template/common/macro.twig' }; private $macros = ['_self' => ...]; protected $parent = FALSE; protected $parents = []; protected $env = class Twig\Environment { private $charset = 'UTF-8'; private $loader = class Twig\Loader\FilesystemLoader { ... }; private $debug = FALSE; private $autoReload = FALSE; private $cache = class Twig\Cache\FilesystemCache { ... }; private $lexer = NULL; private $parser = NULL; private $compiler = NULL; private $globals = [...]; private $resolvedGlobals = [...]; private $loadedTemplates = [...]; private $strictVariables = FALSE; private $templateClassPrefix = '__TwigTemplate_'; private $originalCache = '/tmp/template'; private $extensionSet = class Twig\ExtensionSet { ... }; private $runtimeLoaders = [...]; private $runtimes = [...]; private $optionsHash = '["Twig\\\\Extension\\\\CoreExtension","Twig\\\\Extension\\\\EscaperExtension","Twig\\\\Extension\\\\OptimizerExtension"]:7:4:3.0.4-DEV:0:0' }; protected $blocks = []; protected $traits = []; protected $extensions = ['Twig\Extension\CoreExtension' => class Twig\Extension\CoreExtension { ... }, 'Twig\Extension\EscaperExtension' => class Twig\Extension\EscaperExtension { ... }, 'Twig\Extension\OptimizerExtension' => class Twig\Extension\OptimizerExtension { ... }]; protected $sandbox = NULL }, $method = 'macro_blogBlock', $args = [0 => class Ent\Value\Blog { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 0; private ${L8\Mvc\Value\AbstractValue}_length = 1; private ${L8\Mvc\Value\AbstractValue}_multi = FALSE; private $_avatarPrefix = 'https://cdn-avatar.aijishu.com'; private $statusText = [...] }], $lineno = 288, $context = ['article' => class Ent\Value\Article { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 0; private ${L8\Mvc\Value\AbstractValue}_length = 1; private ${L8\Mvc\Value\AbstractValue}_multi = FALSE; private $statusText = [...] }, 'title' => '实现扩展 external 能力的 Vite 插件', 'commentList' => class Ent\Value\Comment { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 0; private ${L8\Mvc\Value\AbstractValue}_length = 0; private ${L8\Mvc\Value\AbstractValue}_multi = TRUE }, 'excerpt' => '大家对构建工具中的 external 的属性一定不会陌生吧。在优化构建产物体积需求中可能会引入 CDN 来取代一些基础的模块或工具包,如 React、Vue、lodash 等。 最近没什么事情,闲余时间研究了下 Vite 和 Rollup 的内部实现,借此机会来探究下构建工具是如何处理 external 这一类外部链接的,并对 external 的能力做一些扩展。', 'relations' => class Ent\Value\Article { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 6; private ${L8\Mvc\Value\AbstractValue}_length = 6; private ${L8\Mvc\Value\AbstractValue}_multi = TRUE; private $statusText = [...] }, 'EntKeywords' => 'JavaScript', 'allowDownload' => FALSE, 'downloadLimitType' => 'task', 'pageName' => 'detail', 'wechatQrcode' => 'https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=gQEh8DwAAAAAAAAAAS5odHRwOi8vd2VpeGluLnFxLmNvbS9xLzAycllVQkFMREhjdkMxZXR5dk5IY3cAAgSdVfhqAwQAjScA', 'signPackage' => ['appId' => 'wxd2f93f15c9e73adc', 'nonceStr' => '3A4GzYklK63GvS0w', 'timestamp' => 1794665757, 'url' => 'https://community.aijishu.com/a/1060000000368940', 'signature' => '778175c753eb6f4cfe1ad8ede6c41f2df2efe818', 'rawString' => 'jsapi_ticket=LIKLckvwlJT9cWIhEQTwfOR0M1-ny5w7fa1RhaCvcWZR2Njwk3PPcRC19OHkZ7gPxHfTIZobf0nR9UJ9qb9XzQ&noncestr=3A4GzYklK63GvS0w&timestamp=1794665757&url=https://community.aijishu.com/a/1060000000368940'], 'CSRFToken' => '960b1880b17cea72effb77802c93435d', 'links' => class Ent\Value\Link { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 0; private ${L8\Mvc\Value\AbstractValue}_length = 22; private ${L8\Mvc\Value\AbstractValue}_multi = TRUE }, 'wxLogin' => 'https://open.weixin.qq.com/connect/qrconnect?appid=wx28bb22f416bf4d6b&redirect_uri=https%3A%2F%2Fcommunity.aijishu.com%2Fuser%2Foauth%2Fwechat&scope=snsapi_login&self_redirect=false&login_type=jssdk&style=dark&https://cdn-assets.aijishu.com/v-29880a42/public/wx-qrcode.css', 'wxLoginParams' => ['id' => 'wx-login-qrcode', 'appid' => 'wx28bb22f416bf4d6b', 'scope' => 'snsapi_login', 'redirect_uri' => 'https%3A%2F%2Fcommunity.aijishu.com%2Fuser%2Foauth%2Fwechat', 'state' => '', 'style' => 'dark', 'href' => 'https://cdn-assets.aijishu.com/v-29880a42/public/wx-qrcode.css'], 'moduleName' => 'article', 'EntDescription' => '大家对构建工具中的 external 的属性一定不会陌生吧。在优化构建产物体积需求中可能会引入 CDN 来取代一些基础的模块或工具包,如 React、Vue、lodash 等。 最近没什么事情,闲余时间研究了下 Vite 和 Rollup 的内部实现,借此机会来探究下构建工具是如何处理 external 这一类外部链接的,并对 external 的能力做一些扩展。'], $source = class Twig\Source { private $code = ''; private $name = 'article/detail.twig'; private $path = '/Data/webapps/aijishu/template/article/detail.twig' } ).../991b880de2992dd600c40ca80c7a70708f2b669e843c19fe638175d0f1974d4a.php:586
190.01931365952__TwigTemplate_f886f99fcc833337a140021267c2ff818541876872dbdc8ce9d3901c7a7f353d->macro_blogBlock( $__blog__ = class Ent\Value\Blog { private ${L8\Mvc\Value\AbstractValue}_originalData = ['id' => '1070000000368938', 'user_id' => '1030000000368935', 'status' => 'available', 'name' => 'Vite-Plugins', 'slug' => 'vite-plugins', 'avatar' => NULL, 'description' => NULL, 'created' => '1669378841', 'modified' => '1669378841', 'tags' => '', 'contents' => '1']; private ${L8\Mvc\Value\AbstractValue}_data = [0 => [...]]; private ${L8\Mvc\Value\AbstractValue}_pos = 0; private ${L8\Mvc\Value\AbstractValue}_length = 1; private ${L8\Mvc\Value\AbstractValue}_multi = FALSE; private $_avatarPrefix = 'https://cdn-avatar.aijishu.com'; private $statusText = ['available' => '正常', 'deleted' => '删除', 'unpublished' => '未发布', 'hidden' => '已隐藏', 'refuse' => '已拒绝', 'invitation' => '邀请中', 'blocked' => '已禁止', 'unactivated' => ' 未激活'] } ).../CoreExtension.php:1141
200.01991468144twig_get_attribute( $env = class Twig\Environment { private $charset = 'UTF-8'; private $loader = class Twig\Loader\FilesystemLoader { protected $paths = [...]; protected $cache = [...]; protected $errorCache = [...]; private $rootPath = '/Data/webapps/aijishu/portal/' }; private $debug = FALSE; private $autoReload = FALSE; private $cache = class Twig\Cache\FilesystemCache { private $directory = '/tmp/template/'; private $options = 0 }; private $lexer = NULL; private $parser = NULL; private $compiler = NULL; private $globals = []; private $resolvedGlobals = []; private $loadedTemplates = ['__TwigTemplate_4e1c94b12692330a0be02a0a30ed84d76a3eb1de7ec5852532698a907f6a2fbc' => class __TwigTemplate_4e1c94b12692330a0be02a0a30ed84d76a3eb1de7ec5852532698a907f6a2fbc { ... }, '__TwigTemplate_f886f99fcc833337a140021267c2ff818541876872dbdc8ce9d3901c7a7f353d' => class __TwigTemplate_f886f99fcc833337a140021267c2ff818541876872dbdc8ce9d3901c7a7f353d { ... }, '__TwigTemplate_734d14ec28470defff3c4c29d599878cd0e3e81ebb74cc8775eed266b9c666e9' => class __TwigTemplate_734d14ec28470defff3c4c29d599878cd0e3e81ebb74cc8775eed266b9c666e9 { ... }]; private $strictVariables = FALSE; private $templateClassPrefix = '__TwigTemplate_'; private $originalCache = '/tmp/template'; private $extensionSet = class Twig\ExtensionSet { private $extensions = [...]; private $initialized = TRUE; private $runtimeInitialized = TRUE; private $staging = class Twig\Extension\StagingExtension { ... }; private $parsers = [...]; private $visitors = [...]; private $filters = [...]; private $tests = [...]; private $functions = [...]; private $unaryOperators = [...]; private $binaryOperators = [...]; private $globals = NULL; private $functionCallbacks = [...]; private $filterCallbacks = [...]; private $lastModified = 0 }; private $runtimeLoaders = []; private $runtimes = []; private $optionsHash = '["Twig\\\\Extension\\\\CoreExtension","Twig\\\\Extension\\\\EscaperExtension","Twig\\\\Extension\\\\OptimizerExtension"]:7:4:3.0.4-DEV:0:0' }, $source = class Twig\Source { private $code = ''; private $name = 'common/macro.twig'; private $path = '/Data/webapps/aijishu/template/common/macro.twig' }, $object = class Ent\Value\Blog { private ${L8\Mvc\Value\AbstractValue}_originalData = ['id' => '1070000000368938', 'user_id' => '1030000000368935', 'status' => 'available', 'name' => 'Vite-Plugins', 'slug' => 'vite-plugins', 'avatar' => NULL, 'description' => NULL, 'created' => '1669378841', 'modified' => '1669378841', 'tags' => '', 'contents' => '1']; private ${L8\Mvc\Value\AbstractValue}_data = [0 => [...]]; private ${L8\Mvc\Value\AbstractValue}_pos = 0; private ${L8\Mvc\Value\AbstractValue}_length = 1; private ${L8\Mvc\Value\AbstractValue}_multi = FALSE; private $_avatarPrefix = 'https://cdn-avatar.aijishu.com'; private $statusText = ['available' => '正常', 'deleted' => '删除', 'unpublished' => '未发布', 'hidden' => '已隐藏', 'refuse' => '已拒绝', 'invitation' => '邀请中', 'blocked' => '已禁止', 'unactivated' => ' 未激活'] }, $item = 'descriptionExcerpt', $arguments = [], $type = 'any', $isDefinedTest = FALSE, $ignoreStrictCheck = FALSE, $sandboxed = FALSE, $lineno = 241 ).../b208b717415210f8600cef834f225c901089bf3c5f28b14b371785604cf45ca1.php:750
210.01991468472L8\Mvc\Value\AbstractValue->__get( $name = 'descriptionExcerpt' ).../CoreExtension.php:1451
220.01991468952call_user_func_array:{/Data/webapps/aijishu/lib/L8/Mvc/Value/AbstractValue.php:198}( $function_name = [0 => class Ent\Value\Blog { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 0; private ${L8\Mvc\Value\AbstractValue}_length = 1; private ${L8\Mvc\Value\AbstractValue}_multi = FALSE; private $_avatarPrefix = 'https://cdn-avatar.aijishu.com'; private $statusText = [...] }, 1 => 'getDescriptionExcerpt'], $parameters = [] ).../AbstractValue.php:198
230.01991469040Ent\Value\Blog->getDescriptionExcerpt( $limit = ??? ).../AbstractValue.php:198
240.01991469048L8\Mvc\Value\AbstractValue->__get( $name = 'descriptionText' ).../DescriptionTrait.php:25
250.01991469528call_user_func_array:{/Data/webapps/aijishu/lib/L8/Mvc/Value/AbstractValue.php:198}( $function_name = [0 => class Ent\Value\Blog { private ${L8\Mvc\Value\AbstractValue}_originalData = [...]; private ${L8\Mvc\Value\AbstractValue}_data = [...]; private ${L8\Mvc\Value\AbstractValue}_pos = 0; private ${L8\Mvc\Value\AbstractValue}_length = 1; private ${L8\Mvc\Value\AbstractValue}_multi = FALSE; private $_avatarPrefix = 'https://cdn-avatar.aijishu.com'; private $statusText = [...] }, 1 => 'getDescriptionText'], $parameters = [] ).../AbstractValue.php:198
260.01991469616Ent\Value\Blog->getDescriptionText( ).../AbstractValue.php:198
270.01991469624Util::markdown( $text = NULL ).../DescriptionTrait.php:14
280.02001472128HyperDown\Parser->makeHtml( $text = NULL ).../Util.php:76
290.02001480296HyperDown\Parser->initText( $text = NULL ).../Parser.php:159