-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: webpack 5 wrapper handling (#186)
- Loading branch information
1 parent
9c848ca
commit bd87d04
Showing
6 changed files
with
172 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{ "word": "word" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
(function() { | ||
var exports = {}; | ||
exports.id = 223; | ||
exports.ids = [223]; | ||
exports.modules = { | ||
|
||
/***/ 0: | ||
/***/ (function(module, exports, __webpack_require__) { | ||
|
||
module.exports = __webpack_require__("PicC"); | ||
|
||
|
||
/***/ }), | ||
|
||
/***/ "PicC": | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
|
||
"use strict"; | ||
__webpack_require__.r(__webpack_exports__); | ||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return handler; }); | ||
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = require('path'); | ||
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__); | ||
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1__ = require('fs'); | ||
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_1__); | ||
|
||
f(__webpack_require__("oyvS")); | ||
|
||
|
||
function handler(req, res) { | ||
const dictionaryPath = path__WEBPACK_IMPORTED_MODULE_0___default().join(process.cwd(), "assets", "dictionary.json"); | ||
const content = fs__WEBPACK_IMPORTED_MODULE_1___default().readFileSync(dictionaryPath, "utf-8"); | ||
res.json(content); | ||
} | ||
|
||
/***/ }), | ||
|
||
/***/ "mw/K": | ||
/***/ (function(module, exports) { | ||
|
||
module.exports = require("fs"); | ||
|
||
/***/ }), | ||
|
||
/***/ "oyvS": | ||
/***/ (function(module, exports) { | ||
|
||
module.exports = require("path"); | ||
|
||
/***/ }) | ||
|
||
/******/ }; | ||
|
||
// load runtime | ||
var __webpack_require__ = require("../../webpack-runtime.js"); | ||
__webpack_require__.C(exports); | ||
var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); } | ||
var __webpack_exports__ = (__webpack_exec__(277)); | ||
module.exports = __webpack_exports__; | ||
|
||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[ | ||
"package.json", | ||
"test/unit/webpack-5-wrapper-namespace/assets/dictionary.json", | ||
"test/unit/webpack-5-wrapper-namespace/input.js" | ||
] |