Socket
Socket
Sign inDemoInstall

next-transpile-modules

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

next-transpile-modules - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

2

package.json
{
"name": "next-transpile-modules",
"version": "3.0.0",
"version": "3.0.1",
"main": "src/next-transpile-modules.js",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -9,3 +9,3 @@ # Next.js + Transpile `node_modules`

## What problem does it solve?
## What problems does it solve?

@@ -83,3 +83,3 @@ This plugin aims to solve the following challenges:

Since `next-transpile-modules@3.0` and `next@>9.2`, this plugin will also transpile CSS included in your transpiled packages:
Since `next-transpile-modules@3` and `next@>9.2`, this plugin will also transpile CSS included in your transpiled packages:

@@ -86,0 +86,0 @@ In your transpiled package:

const path = require('path');
const util = require('util');

@@ -21,3 +20,6 @@ const PATH_DELIMITER = '[\\\\/]'; // match 2 antislashes or one slash

const generateIncludes = (modules) => {
return [new RegExp(`(${modules.map(safePath).join('|')})${PATH_DELIMITER}(?!.*node_modules)`)];
return [
new RegExp(`(${modules.map(safePath).join('|')})$`),
new RegExp(`(${modules.map(safePath).join('|')})${PATH_DELIMITER}(?!.*node_modules)`)
];
};

@@ -28,3 +30,3 @@

new RegExp(
`node_modules${PATH_DELIMITER}(?!(${modules.map(safePath).join('|')})${PATH_DELIMITER}(?!.*node_modules))`
`node_modules${PATH_DELIMITER}(?!(${modules.map(safePath).join('|')})(${PATH_DELIMITER}|$)(?!.*node_modules))`
)

@@ -49,6 +51,2 @@ ];

webpack(config, options) {
// console.log(util.inspect(config.module.rules, false, null, true /* enable colors */));
// console.log('=================================');
// console.log(options.defaultLoaders);
// Safecheck for Next < 5.0

@@ -55,0 +53,0 @@ if (!options.defaultLoaders) {

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