Socket
Socket
Sign inDemoInstall

babel-loader

Package Overview
Dependencies
127
Maintainers
5
Versions
77
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 9.1.2 to 9.1.3

7

lib/cache.js

@@ -1,3 +0,1 @@

"use strict";
/**

@@ -16,3 +14,2 @@ * Filesystem Cache

const crypto = require("crypto");
const findCacheDir = require("find-cache-dir");
const {

@@ -26,2 +23,3 @@ promisify

} = require("fs/promises");
const findCacheDirP = import("find-cache-dir");
const transform = require("./transform");

@@ -172,2 +170,5 @@ // Lazily instantiated when needed

if (defaultCacheDirectory === null) {
const {
default: findCacheDir
} = await findCacheDirP;
defaultCacheDirectory = findCacheDir({

@@ -174,0 +175,0 @@ name: "babel-loader"

@@ -1,3 +0,1 @@

"use strict";
const STRIP_FILENAME_RE = /^[^:]+: /;

@@ -4,0 +2,0 @@ const format = err => {

@@ -1,3 +0,1 @@

"use strict";
let babel;

@@ -4,0 +2,0 @@ try {

@@ -1,3 +0,1 @@

"use strict";
const babel = require("@babel/core");

@@ -4,0 +2,0 @@ module.exports = function injectCaller(opts, target) {

@@ -1,3 +0,1 @@

"use strict";
const babel = require("@babel/core");

@@ -4,0 +2,0 @@ const {

{
"name": "babel-loader",
"version": "9.1.2",
"version": "9.1.3",
"description": "babel module loader for webpack",

@@ -13,3 +13,3 @@ "files": [

"dependencies": {
"find-cache-dir": "^3.3.2",
"find-cache-dir": "^4.0.0",
"schema-utils": "^4.0.0"

@@ -45,3 +45,3 @@ },

"rimraf": "^3.0.0",
"semver": "7.3.2",
"semver": "7.5.2",
"webpack": "^5.74.0"

@@ -48,0 +48,0 @@ },

@@ -44,3 +44,3 @@ > This README is for babel-loader v8/v9 with Babel v7

{
test: /\.m?js$/,
test: /\.(?:js|mjs|cjs)$/,
exclude: /node_modules/,

@@ -70,3 +70,3 @@ use: {

{
test: /\.m?js$/,
test: /\.(?:js|mjs|cjs)$/,
exclude: /node_modules/,

@@ -111,3 +111,3 @@ use: {

Although we typically recommend not compiling `node_modules`, you may need to when using libraries that do not support IE 11.
Although we typically recommend not compiling `node_modules`, you may need to when using libraries that do not support IE 11 or any legacy targets.

@@ -118,3 +118,3 @@ For this, you can either use a combination of `test` and `not`, or [pass a function](https://webpack.js.org/configuration/module/#condition) to your `exclude` option. You can also use negative lookahead regex as suggested [here](https://github.com/webpack/webpack/issues/2031#issuecomment-294706065).

{
test: /\.m?js$/,
test: /\.(?:js|mjs|cjs)$/,
exclude: {

@@ -157,3 +157,3 @@ and: [/node_modules/], // Exclude libraries in node_modules ...

{
test: /\.m?js$/,
test: /\.(?:js|mjs|cjs)$/,
exclude: /node_modules/,

@@ -224,3 +224,3 @@ use: {

{
test: /\.m?js$/,
test: /\.(?:js|mjs|cjs)$/,
loader: 'babel',

@@ -236,3 +236,3 @@ }

{
test: /\.m?js$/,
test: /\.(?:js|mjs|cjs)$/,
loader: 'babel-loader',

@@ -333,3 +333,4 @@ }

module.exports = require("babel-loader").custom(babel => {
function myPlugin() {
// Extract the custom options in the custom plugin
function myPlugin(api, { opt1, opt2 }) {
return {

@@ -353,3 +354,3 @@ visitor: {},

// Passed Babel's 'PartialConfig' object.
config(cfg) {
config(cfg, { customOptions }) {
if (cfg.hasFilesystemConfig()) {

@@ -365,4 +366,4 @@ // Use the normal config

// Include a custom plugin in the options.
myPlugin,
// Include a custom plugin in the options and passing it the customOptions object.
[myPlugin, customOptions],
],

@@ -402,3 +403,3 @@ };

### `config(cfg: PartialConfig): Object`
### `config(cfg: PartialConfig, options: { source, customOptions }): Object`

@@ -405,0 +406,0 @@ Given Babel's `PartialConfig` object, return the `options` object that should

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc