Files
rspade_system/node_modules/webpack/lib/util/magicComment.js
root b5eb27a827 Update npm packages (73 packages including @jqhtml 2.3.36)
Update npm registry domain from privatenpm.hanson.xyz to npm.internal.hanson.xyz

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-20 11:31:28 +00:00

26 lines
638 B
JavaScript
Executable File

/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Alexander Akait @alexander-akait
*/
"use strict";
const memoize = require("./memoize");
const getVm = memoize(() => require("vm"));
// regexp to match at least one "magic comment"
module.exports.createMagicCommentContext = () =>
getVm().createContext(undefined, {
name: "Webpack Magic Comment Parser",
codeGeneration: { strings: false, wasm: false }
});
module.exports.webpackCommentRegExp = new RegExp(
/(^|\W)webpack[A-Z][A-Za-z]+:/
);
// regexp to match at least one "magic comment"
/**
* @returns {import("vm").Context} magic comment context
*/