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 7.1.2 to 7.2.0

4

package.json
{
"name": "next-transpile-modules",
"version": "7.1.2",
"version": "7.2.0",
"license": "MIT",

@@ -18,3 +18,3 @@ "author": "Pierre de la Martinière <pierre.de.la.martiniere@gmail.com>",

"pretest": "npm run setup",
"quickie": "node --trace-uncaught src/__tests__/setup.js && yarn --cwd src/__tests__/__apps__/webpack-4/app run build",
"quickie": "node --trace-uncaught src/__tests__/setup.js && yarn --cwd src/__tests__/__apps__/yarn-workspaces/app run dev",
"test": "jest --forceExit",

@@ -21,0 +21,0 @@ "test:debug": "jest --detectOpenHandles --forceExit",

@@ -201,3 +201,2 @@ /**

}
if (resolveSymlinks !== undefined) {

@@ -316,2 +315,30 @@ // Avoid Webpack to resolve transpiled modules path to their real path as

// Add support for Global CSS imports in transpiled modules
if (nextCssLoaders) {
const nextGlobalCssLoader = nextCssLoaders.oneOf.find(
(rule) => rule.sideEffects === true && regexEqual(rule.test, /(?<!\.module)\.css$/)
);
if (nextGlobalCssLoader) {
nextGlobalCssLoader.issuer = { or: [matcher, nextGlobalCssLoader.issuer] };
nextGlobalCssLoader.include = { or: [...modulesPaths, nextGlobalCssLoader.include] };
} else if (!options.isServer) {
// Note that Next.js ignores global CSS imports on the server
console.warn('next-transpile-modules - could not find default CSS rule, global CSS imports may not work');
}
const nextGlobalSassLoader = nextCssLoaders.oneOf.find(
(rule) => rule.sideEffects === true && regexEqual(rule.test, /(?<!\.module)\.(scss|sass)$/)
);
// FIXME: SASS works only when using a custom _app.js file.
// See https://github.com/vercel/next.js/blob/24c3929ec46edfef8fb7462a17edc767a90b5d2b/packages/next/build/webpack/config/blocks/css/index.ts#L211
if (nextGlobalSassLoader) {
nextGlobalSassLoader.issuer = { or: [matcher, nextGlobalSassLoader.issuer] };
} else if (!options.isServer) {
// Note that Next.js ignores global SASS imports on the server
console.info('next-transpile-modules - global SASS imports only work with a custom _app.js file');
}
}
// Make hot reloading work!

@@ -318,0 +345,0 @@ // FIXME: not working on Wepback 5

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