source: frontend/node_modules/webpack/lib/util/magicComment.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 739 bytes
Line 
1/*
2 MIT License http://www.opensource.org/licenses/mit-license.php
3 Author Alexander Akait @alexander-akait
4*/
5
6"use strict";
7
8const memoize = require("./memoize");
9
10const getVm = memoize(() => require("vm"));
11
12module.exports.CompilerHintNotationRegExp = Object.freeze({
13 Pure: /^\s*(?:#|@)__PURE__\s*$/,
14 NoSideEffects: /^\s*[#@]__NO_SIDE_EFFECTS__\s*$/
15});
16
17/**
18 * regexp to match at least one "magic comment"
19 * @returns {import("vm").Context} magic comment context
20 */
21module.exports.createMagicCommentContext = () =>
22 getVm().createContext(undefined, {
23 name: "Webpack Magic Comment Parser",
24 codeGeneration: { strings: false, wasm: false }
25 });
26
27module.exports.webpackCommentRegExp = new RegExp(
28 /(^|\W)webpack[A-Z][A-Za-z]+:/
29);
Note: See TracBrowser for help on using the repository browser.