Socket
Socket
Sign inDemoInstall

babel-loader

Package Overview
Dependencies
315
Maintainers
4
Versions
77
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 6.3.0 to 6.3.1

22

CHANGELOG.md
# Changelog
## v6.3.1
### 🐛 Bug Fix
- The new `forceEnv` options wasn't working as expected (#379) @chrisvasz
## v6.3.0
### 🚀 New Feature
- Add new config option `forceEnv` (#368) @moimael
Allow to override BABEL_ENV/NODE_ENV at loader-level. Useful for isomorphic applications which have separate babel config for client and server.
### 🐛 Bug Fix
- Update loader-utils dependency to ^0.2.16 to fix compatibility with webpack 2 (#371) @leonaves
### 💅 Polish
- Improve FS caching to do less sync calls which improves performance slightly (#375) @akx
## v6.2.10

@@ -4,0 +26,0 @@

6

lib/index.js

@@ -77,2 +77,3 @@ "use strict";

var userOptions = assign({}, globalOptions, loaderOptions);
var env = userOptions.forceEnv || process.env.BABEL_ENV || process.env.NODE_ENV;
var defaultOptions = {

@@ -86,3 +87,3 @@ inputSourceMap: inputSourceMap,

babelrc: exists(userOptions.babelrc) ? read(userOptions.babelrc) : resolveRc(path.dirname(filename)),
env: userOptions.forceEnv || process.env.BABEL_ENV || process.env.NODE_ENV
env: env
})

@@ -127,4 +128,7 @@ };

var tmpEnv = process.env.BABEL_ENV;
process.env.BABEL_ENV = env;
result = transpile(source, options);
process.env.BABEL_ENV = tmpEnv;
this.callback(null, result.code, result.map);
};

2

package.json
{
"name": "babel-loader",
"version": "6.3.0",
"version": "6.3.1",
"description": "babel module loader for webpack",

@@ -5,0 +5,0 @@ "files": [

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