inottn

Results 93 comments of inottn

> ```js > assetPath = runtimeRequirements.has(RuntimeGlobals.dynamicPublicPath) > ? runtimeTemplate.generateFunction(RuntimeGlobals.dynamicPublicPath, runtimeTemplate.concatenation({ expr: RuntimeGlobals.publicPath }, filename))) > : runtimeTemplate.concatenation({ expr: RuntimeGlobals.publicPath }, filename)); > ``` I have a question. What's the way...

> [@inottn](https://github.com/inottn) Plugin can use `additionalTreeRuntimeRequirements` hook to add it I tested it, and it seems that the execution time of [additionalTreeRuntimeRequirements.call](https://github.com/webpack/webpack/blob/fab79c1b5dc0b596929187c1bcfd90c08d9e4fbc/lib/Compilation.js#L3672-L3676) is later than [_getAssetPathWithInfo](https://github.com/webpack/webpack/blob/fab79c1b5dc0b596929187c1bcfd90c08d9e4fbc/lib/asset/AssetGenerator.js#L430-L435).

> Is there any plan to support this feature? [@inottn](https://github.com/inottn) [@chenjiahan](https://github.com/chenjiahan) No plans yet, but PR welcome.

Thanks for your PR. Can you add a test case for this issue?

It appears to behave consistently with Vite, invoking the plugin for each module.

> 是不是直接更新版本上来就解决了?🤔 > > 建议把最低依赖升到3.5.0, 发布为一个minor版本。 如果使用 [data-allow-mismatch](https://vuejs.org/api/ssr.html#data-allow-mismatch),是不是可以在不更新版本的情况下,暂时解决这个问题 🤔

> > > 是不是直接更新版本上来就解决了?🤔 > > > 建议把最低依赖升到3.5.0, 发布为一个minor版本。 > > > > > > 如果使用 [data-allow-mismatch](https://vuejs.org/api/ssr.html#data-allow-mismatch),是不是可以在不更新版本的情况下,暂时解决这个问题 🤔 > > 压制警告和让id在ssr和客户端一致应该不是同一回事吧?如果觉得压制警告就是解决问题的话,可以选择这样做,但原始问题应该是解决id不一致 是不一样,所以我说的是暂时。因为必须升版本才能完全解决这个问题,但对用户而言并不是很友好。

晚些时候我会创建一个 PR 使用 data-allow-mismatch 暂时消除警告,因为它不会引入任何副作用,如果我们决定升级版本,也可以之后将它移除。

Based on my testing, this behavior is consistent with webpack's behavior.