/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/configCases/html/script-src/__snapshots__/ConfigTest.snap
152 строки
6 KB
Xiao
perf(runtime): skip IIFE wrapping for RuntimeModules without locals (#21633)
09 авг 2026, 17:30
Не верифицирован
09 авг 2026, 17:30
22b12df
Код
Авторство
О чём код?
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing exports[`ConfigTestCases html script-src exported tests should bundle <script type=module src> through ESM resolution alongside classic scripts 1`] = ` "/*!*************************!*\\\\ !*** ./module-entry.js ***! \\\\*************************/ /* unused harmony export value */ const value = \\"module entry\\"; /* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = ((/* unused pure expression or super */ null && (value))); " `; exports[`ConfigTestCases html script-src exported tests should bundle classic <script src> through CommonJS resolution 1`] = ` "/******/ var __webpack_modules__ = ({ /***/ 97 /*!******************!*\\\\ !*** ./entry.js ***! \\\\******************/ (module) { module.exports = \\"first entry\\"; /***/ } /******/ }); /************************************************************************/ /******/ // The module cache /******/ const __webpack_module_cache__ = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ const cachedModule = __webpack_module_cache__[moduleId]; /******/ if (cachedModule !== undefined) { /******/ return cachedModule.exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ const module = __webpack_module_cache__[moduleId] = { /******/ // no module.id needed /******/ // no module.loaded needed /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ if (!(moduleId in __webpack_modules__)) { /******/ delete __webpack_module_cache__[moduleId]; /******/ const e = new Error(\\"Cannot find module '\\" + moduleId + \\"'\\"); /******/ e.code = 'MODULE_NOT_FOUND'; /******/ throw e; /******/ } /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = __webpack_modules__; /******/ /************************************************************************/ /******/ /* webpack/runtime/hasOwnProperty shorthand */ /******/ __webpack_require__.o = (obj, prop) => (Object.hasOwn(obj, prop)); /******/ /******/ /* webpack/runtime/export webpack runtime */ /******/ export { __webpack_require__ }; /******/ /******/ /* webpack/runtime/import chunk loading */ /******/ (() => { /******/ // no baseURI /******/ /******/ // object to store loaded and loading chunks /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched /******/ // [resolve, Promise] = chunk loading, 0 = chunk loaded /******/ const installedChunks = { /******/ \\"__html_cbe5b59d_0\\": 0 /******/ }; /******/ /******/ const installChunk = (data) => { /******/ let {__webpack_esm_ids__, __webpack_esm_modules__, __webpack_esm_runtime__} = data; /******/ // add \\"modules\\" to the modules object, /******/ // then flag all \\"ids\\" as loaded and fire callback /******/ var moduleId, chunkId, i = 0; /******/ for(moduleId in __webpack_esm_modules__) { /******/ if(__webpack_require__.o(__webpack_esm_modules__, moduleId)) { /******/ __webpack_require__.m[moduleId] = __webpack_esm_modules__[moduleId]; /******/ } /******/ } /******/ if(__webpack_esm_runtime__) __webpack_esm_runtime__(__webpack_require__); /******/ for(;i < __webpack_esm_ids__.length; i++) { /******/ chunkId = __webpack_esm_ids__[i]; /******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) { /******/ installedChunks[chunkId][0](); /******/ } /******/ installedChunks[__webpack_esm_ids__[i]] = 0; /******/ } /******/ /******/ } /******/ /******/ // no chunk on demand loading /******/ /******/ // no prefetching /******/ /******/ // no preloaded /******/ /******/ __webpack_require__.C = installChunk; /******/ /******/ // no analyzable chunk import /******/ /******/ // no on chunks loaded /******/ // no HMR /******/ /******/ // no HMR manifest /******/ })(); /******/ /************************************************************************/ /******/ /******/ // startup /******/ // Load entry module and return exports /******/ // This entry module is referenced by other modules so it can't be inlined /******/ let __webpack_exports__ = __webpack_require__(97); /******/ " `; exports[`ConfigTestCases html script-src exported tests should bundle classic and module <script src> as separate entry chunks and rewrite their src attributes 1`] = ` "<!DOCTYPE html> <html> <head> <title>Test</title> <link rel=\\"stylesheet\\" href=\\"a69243d21de4c981a8a4.css\\"> <link rel=\\"icon\\" href=\\"31d6cfe0d16ae931b73c.png\\"> <script type=\\"module\\" src=\\"__html_cbe5b59d_0.chunk.js\\"></script> </head> <body> <h1>Hello</h1> <script type=\\"module\\" src=\\"__html_cbe5b59d_1.chunk.js\\"></script> <script type=\\"module\\" src=\\"__html_cbe5b59d_2.chunk.js\\"></script> <script type=\\"module\\" src=\\"__html_cbe5b59d_3.chunk.js\\"></script> <script type=\\"module\\" src=\\"__html_cbe5b59d_4.chunk.js\\"></script> <script type=\\"module\\" src=\\"__html_cbe5b59d_5.chunk.js\\"></script> <!-- Non-JS script types must NOT be bundled as JS entries. They flow through the regular HtmlSourceDependency path: rewritten as an asset URL, the attribute stays as-is. --> <script type=\\"application/ld+json\\" src=\\"0a4a9867db930e489a2e.jsonld\\"></script> <script type=\\"importmap\\" src=\\"143e9e5a878c5c71b387.json\\"></script> </body> </html> " `;