New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.4.0 to 1.4.1

4

dist/package.json
{
"name": "magic-comments-loader",
"version": "1.4.0",
"version": "1.4.1",
"description": "Add webpack magic comments to your dynamic imports during build time",

@@ -45,3 +45,3 @@ "main": "index.js",

"eslint-plugin-prettier": "^4.0.0",
"jest": "^27.1.0",
"jest": "^27.1.1",
"memfs": "^3.2.4",

@@ -48,0 +48,0 @@ "prettier": "^2.3.2",

{
"name": "magic-comments-loader",
"version": "1.4.0",
"version": "1.4.1",
"description": "Add webpack magic comments to your dynamic imports during build time",

@@ -46,3 +46,3 @@ "main": "dist",

"eslint-plugin-prettier": "^4.0.0",
"jest": "^27.1.0",
"jest": "^27.1.1",
"memfs": "^3.2.4",

@@ -49,0 +49,0 @@ "prettier": "^2.3.2",

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

Try *not* to have dynamic `import()` statements behind [comments](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#comments). **It is better to remove unused code in production**.
If you must, e.g. your comment is referencing usage of dynamic imports, then these styles are ok:
```js
// import('some-ignored-module')
/* Some comment about a dynamic import('module') */
/**
* Some multiline comment, only use one import() per line.
* Comment about import('module/one')
* Comment about import('module/two')
* import('module/three'), etc.
*/
```
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.
### Configuration

@@ -44,0 +26,0 @@

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