next-transpile-modules
Advanced tools
Comparing version 4.0.0 to 4.0.1
{ | ||
"name": "next-transpile-modules", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"main": "src/next-transpile-modules.js", | ||
@@ -39,3 +39,3 @@ "license": "MIT", | ||
"devDependencies": { | ||
"@types/jest-environment-puppeteer": "^4.3.1", | ||
"@types/jest-environment-puppeteer": "4.3.2", | ||
"anymatch": "2.0.0", | ||
@@ -51,7 +51,7 @@ "eslint": "6.8.0", | ||
"jest": "25.1.0", | ||
"jest-environment-puppeteer": "^4.4.0", | ||
"jest-environment-puppeteer": "4.4.0", | ||
"jest-puppeteer": "^4.4.0", | ||
"prettier": "1.19.1", | ||
"prettier-eslint": "9.0.1", | ||
"puppeteer": "^2.1.1", | ||
"puppeteer": "5.2.1", | ||
"rewire": "4.0.1", | ||
@@ -58,0 +58,0 @@ "webpack": "^4.44.0" |
@@ -7,2 +7,7 @@ const path = require('path'); | ||
// Use me when needed | ||
// const inspect = (object) => { | ||
// console.log(util.inspect(object, { showHidden: false, depth: null })); | ||
// }; | ||
/** | ||
@@ -44,8 +49,2 @@ * Stolen from https://stackoverflow.com/questions/10776600/testing-for-equality-of-regular-expressions | ||
/** | ||
* Checks if the given issuer uses the old attributes 'include' and 'exclude' | ||
* or the new ones 'and' and 'not'. | ||
*/ | ||
const isModernIssuer = (issuer) => !!issuer.and || !!issuer.or || !!issuer.not; | ||
/** | ||
* Actual Next.js plugin | ||
@@ -119,25 +118,13 @@ */ | ||
if (nextCssLoader) { | ||
if (isModernIssuer(nextCssLoader.issuer)) { | ||
nextCssLoader.issuer.or = nextCssLoader.issuer.or ? nextCssLoader.issuer.or.concat(includes) : includes; | ||
nextCssLoader.issuer.not = excludes; | ||
} else { | ||
nextCssLoader.issuer.include = nextCssLoader.issuer.include | ||
? nextCssLoader.issuer.include.concat(includes) | ||
: includes; | ||
nextCssLoader.issuer.exclude = excludes; | ||
} | ||
nextCssLoader.issuer.or = nextCssLoader.issuer.and ? nextCssLoader.issuer.and.concat(includes) : includes; | ||
nextCssLoader.issuer.not = excludes; | ||
delete nextCssLoader.issuer.and; | ||
} | ||
if (nextSassLoader) { | ||
if (isModernIssuer(nextSassLoader.issuer)) { | ||
nextSassLoader.issuer.or = nextSassLoader.issuer.or | ||
? nextSassLoader.issuer.or.concat(includes) | ||
: includes; | ||
nextSassLoader.issuer.not = excludes; | ||
} else { | ||
nextSassLoader.issuer.include = nextSassLoader.issuer.include | ||
? nextSassLoader.issuer.include.concat(includes) | ||
: includes; | ||
nextSassLoader.issuer.exclude = excludes; | ||
} | ||
nextSassLoader.issuer.or = nextSassLoader.issuer.and | ||
? nextSassLoader.issuer.and.concat(includes) | ||
: includes; | ||
nextSassLoader.issuer.not = excludes; | ||
delete nextSassLoader.issuer.and; | ||
} | ||
@@ -144,0 +131,0 @@ |
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
18026
168