New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

babel-preset-insilico-react-app

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-preset-insilico-react-app - npm Package Compare versions

Comparing version

to
1.1.4

21

index.js
'use strict';
var path = require('path');
const path = require('path');
const objectAssign = require('object-assign');

@@ -77,4 +78,4 @@ /**

module.exports = function(context) {
var config;
module.exports = function(context, envOptions) {
let config;

@@ -113,3 +114,3 @@ if (env === 'test') {

require.resolve('babel-preset-env'),
{
objectAssign({
targets: {

@@ -125,4 +126,4 @@ // React parses on ie 9, so we should too

// Do not transform modules to CJS
modules: false,
},
modules: getModulesMethod(),
}, envOptions),
],

@@ -143,2 +144,8 @@ // JSX, Flow

return config;
};
};
function getModulesMethod() {
if (!process.env.MODULES) return false
if (process.env.MODULES === 'false' || process.env.MODULES === 'null') return false
return process.env.MODULES
}
{
"name": "babel-preset-insilico-react-app",
"version": "1.1.3",
"version": "1.1.4",
"description": "Babel preset used by Insilico",

@@ -19,6 +19,3 @@ "repository": "https://github.com/InSilicoCPH/babel-preset-insilico-react-app",

"jest": {
"testEnvironment": "node",
"transformIgnorePatterns": [
"<rootDir>/(node_modules)/"
]
"testEnvironment": "node"
},

@@ -50,3 +47,4 @@ "scripts": {

"babel-preset-react": "^6.24.1",
"babel-runtime": "^6.23.0"
"babel-runtime": "^6.23.0",
"object-assign": "4.1.1"
},

@@ -53,0 +51,0 @@ "devDependencies": {

@@ -11,6 +11,25 @@ # babel-preset-insilico-react-app

```js
{
"presets": ["insilico-react-app"]
}
```
```js
{
"presets": ["insilico-react-app"]
}
```
You can send options along, that will be passed directly to `babel-preset-env`: https://github.com/babel/babel-preset-env.
```js
{
"presets": [
[
"insilico-react-app",
{
"modules": "commonjs"
}
]
]
}
```
By default modules (import/export) will not be transformed. If you need to that, you can either pass the relevant option or set the `MODULES` environment variable.
Valid vaules: `"amd"` | `"umd"` | `"systemjs"` | `"commonjs"` | `false`.