Files
rspade_system/node_modules/webpack/lib/esm/ExportWebpackRequireRuntimeModule.js
root f6fac6c4bc Fix bin/publish: copy docs.dist from project root
Fix bin/publish: use correct .env path for rspade_system
Fix bin/publish script: prevent grep exit code 1 from terminating script

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-21 02:08:33 +00:00

38 lines
1005 B
JavaScript
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*
MIT License http://www.opensource.org/licenses/mit-license.php
*/
"use strict";
const RuntimeGlobals = require("../RuntimeGlobals");
const RuntimeModule = require("../RuntimeModule");
const Template = require("../Template");
// CompatibilityPlugin renames `__webpack_require__` but doesnt account for `export { __webpack_require__ }`, so we create a temporary variable to handle it.
const EXPORT_TEMP_NAME = "__webpack_require_temp__";
class ExportWebpackRequireRuntimeModule extends RuntimeModule {
constructor() {
super("export webpack runtime", RuntimeModule.STAGE_ATTACH);
}
/**
* @returns {boolean} true, if the runtime module should get it's own scope
*/
shouldIsolate() {
return false;
}
/**
* @returns {string | null} runtime code
*/
generate() {
return Template.asString([
`var ${EXPORT_TEMP_NAME} = ${RuntimeGlobals.require};`,
`export { ${EXPORT_TEMP_NAME} as ${RuntimeGlobals.require} };`
]);
}
}
module.exports = ExportWebpackRequireRuntimeModule;