next-transpile-modules
Advanced tools
Comparing version 3.0.0 to 3.0.1
{ | ||
"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) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
13352
115