Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

magic-comments-loader

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

magic-comments-loader - npm Package Compare versions

Comparing version 1.3.1 to 1.3.2

4

dist/loader.js

@@ -16,3 +16,3 @@ "use strict";

const dynamicImportsWithoutComments = /(?<![\w.]|#!|\*[\s\w]*?|\/\/\s*)import\s*\((?!\s*\/\*)(?<path>\s*?['"`][^)]+['"`]\s*)\)(?![\s]*?\*\/)/g;
var _util = require("./util.js");

@@ -31,5 +31,5 @@ const loader = function (source, map, meta) {

}, logger);
this.callback(null, source.replace(dynamicImportsWithoutComments, magicComments), map, meta);
this.callback(null, source.replace(_util.dynamicImportsWithoutComments, magicComments), map, meta);
};
exports.loader = loader;
{
"name": "magic-comments-loader",
"version": "1.3.1",
"version": "1.3.2",
"description": "Add webpack magic comments to your dynamic imports during build time",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -6,3 +6,3 @@ "use strict";

});
exports.importPrefix = exports.pathIsMatch = exports.getOverrideSchema = exports.getOverrideConfig = void 0;
exports.dynamicImportsWithoutComments = exports.importPrefix = exports.pathIsMatch = exports.getOverrideSchema = exports.getOverrideConfig = void 0;

@@ -72,2 +72,4 @@ var _micromatch = _interopRequireDefault(require("micromatch"));

const importPrefix = /^(?:(\.{1,2}\/)+)|^\/|^.+:\/\/\/?[.-\w]+\//;
exports.importPrefix = importPrefix;
exports.importPrefix = importPrefix;
const dynamicImportsWithoutComments = /(?<![\w.]|#!|\*[\s\w]*?|\/\/\s*|['"`][^)$]*)import\s*\((?!\s*\/\*)(?<path>\s*?['"`][^)]+['"`]\s*)\)(?!\s*?\*\/)/g;
exports.dynamicImportsWithoutComments = dynamicImportsWithoutComments;
{
"name": "magic-comments-loader",
"version": "1.3.1",
"version": "1.3.2",
"description": "Add webpack magic comments to your dynamic imports during build time",

@@ -5,0 +5,0 @@ "main": "dist",

@@ -37,3 +37,3 @@ # [`magic-comments-loader`](https://www.npmjs.com/package/magic-comments-loader)

This module uses a [RegExp](https://github.com/morganney/magic-comments-loader/blob/master/src/loader.js#L8) not a parser. If you would like to add better support for ignoring `import()` behind multiline comments please open a pull request. See some more [examples on regexr](https://regexr.com/65fg0).
This module uses a RegExp not a parser. If you would like to add better support for ignoring `import()` behind multiline comments please open a pull request. See some more [examples on regexr](https://regexr.com/65fg0).

@@ -40,0 +40,0 @@ ### Configuration

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc