Skip to content
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.

Commit

Permalink
Merge pull request #36 from paulfalgout/patch-2
Browse files Browse the repository at this point in the history
major: Move external resources to peerDependencies
  • Loading branch information
chrisbreiding committed Nov 8, 2018
2 parents ce78a17 + dd3678e commit 22db72d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 12 deletions.
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,22 @@ Cypress preprocessor for bundling JavaScript via webpack
npm install --save-dev @cypress/webpack-preprocessor
```

This package relies on the following [peer dependencies](https://docs.npmjs.com/files/package.json#peerdependencies):

* @babel/core
* @babel/preset-env
* babel-loader
* webpack

It is likely you already have these installed either directly or as a transient dependency, but if not, you will need to install them.

```sh
npm install --save-dev @babel/core @babel/preset-env babel-loader webpack
```

## Compatibility

This version is only compatible with webpack 4.x+ and Babel 7.x+.
This version is only compatible with webpack 4.x+ and Babel 7.x+.

* If you need webpack 2 or 3 support, use `@cypress/webpack-preprocessor` 1.x
* If you need Babel 6 support, use `@cypress/webpack-preprocessor` <= 2.x
Expand Down Expand Up @@ -63,10 +76,7 @@ Object of webpack options. Just `require` in the options from your `webpack.conf
use: [{
loader: 'babel-loader',
options: {
presets: [
'babel-preset-env',
'babel-preset-react',
],
presets: ['babel-preset-env'],
},
}],
},
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const defaultOptions = {
{
loader: require.resolve('babel-loader'),
options: {
presets: ['@babel/preset-env', '@babel/preset-react'].map(require.resolve),
presets: require.resolve('@babel/preset-env'),
},
},
],
Expand Down
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,16 @@
"sinon": "3.2.1",
"sinon-chai": "2.13.0"
},
"peerDependencies": {
"@babel/core": "^7.0.1",
"@babel/preset-env": "^7.0.0",
"babel-loader": "^8.0.2",
"webpack": "^4.18.1"
},
"dependencies": {
"@babel/core": "7.0.1",
"@babel/preset-env": "7.0.0",
"@babel/preset-react": "7.0.0",
"babel-loader": "8.0.2",
"bluebird": "3.5.0",
"debug": "3.1.0",
"lodash.clonedeep": "4.5.0",
"webpack": "4.18.1"
"lodash.clonedeep": "4.5.0"
},
"release": {
"verifyConditions": "condition-circle",
Expand Down

0 comments on commit 22db72d

Please sign in to comment.