@cypress/webpack-preprocessor
Advanced tools
Comparing version 4.0.4 to 4.1.0
@@ -75,2 +75,3 @@ const path = require('path') | ||
const entry = [filePath].concat(options.additionalEntries || []) | ||
// we're provided a default output path that lives alongside Cypress's | ||
@@ -83,3 +84,3 @@ // app data files so we don't have to worry about where to put the bundled | ||
webpackOptions = Object.assign(webpackOptions, { | ||
entry: filePath, | ||
entry, | ||
output: { | ||
@@ -86,0 +87,0 @@ path: path.dirname(outputPath), |
@@ -1,1 +0,1 @@ | ||
{"name":"@cypress/webpack-preprocessor","description":"Cypress preprocessor for bundling JavaScript via webpack","version":"4.0.4","author":"Chris Breiding <chris@cypress.io>","bugs":"https://github.com/cypress-io/cypress-webpack-preprocessor/issues","files":["*.js"],"private":false,"homepage":"https://github.com/cypress-io/cypress-webpack-preprocessor#readme","keywords":["cypress","cypress-plugin","cypress-preprocessor","webpack"],"license":"MIT","repository":{"type":"git","url":"https://github.com/cypress-io/cypress-webpack-preprocessor.git"},"scripts":{"ban":"ban","deps":"deps-ok && dependency-check --no-dev .","license":"license-checker --production --onlyunknown --csv","lint":"eslint --fix *.js","pretest":"npm run lint","secure":"nsp check","size":"t=\"$(npm pack .)\"; wc -c \"${t}\"; tar tvf \"${t}\"; rm \"${t}\";","test":"mocha","test-watch":"chokidar '*.js' 'test/*.js' -c 'mocha'","semantic-release":"semantic-release pre && npm publish --access public && semantic-release post"},"devDependencies":{"@babel/core":"^7.0.1","@babel/preset-env":"^7.0.0","babel-loader":"^8.0.2","ban-sensitive-files":"1.9.0","chai":"4.1.2","chokidar-cli":"1.2.0","condition-circle":"1.5.0","dependency-check":"2.9.1","deps-ok":"1.2.1","dont-crack":"1.2.1","eslint":"4.6.1","eslint-plugin-cypress-dev":"1.1.1","eslint-plugin-mocha":"4.11.0","github-post-release":"1.13.1","license-checker":"13.0.3","mocha":"3.5.0","mockery":"2.1.0","nsp":"2.7.0","prettier-eslint-cli":"4.4.0","semantic-release":"8.2.0","simple-commit-message":"3.3.1","sinon":"3.2.1","sinon-chai":"2.13.0","webpack":"^4.18.1"},"peerDependencies":{"webpack":"^4.18.1"},"optionalDependencies":{"@babel/core":"^7.0.1","@babel/preset-env":"^7.0.0","babel-loader":"^8.0.2"},"dependencies":{"bluebird":"3.5.0","debug":"3.1.0"},"release":{"verifyConditions":"condition-circle","analyzeCommits":"simple-commit-message","generateNotes":"github-post-release","verifyRelease":{"path":"dont-crack","test-against":[]}}} | ||
{"name":"@cypress/webpack-preprocessor","description":"Cypress preprocessor for bundling JavaScript via webpack","version":"4.1.0","author":"Chris Breiding <chris@cypress.io>","bugs":"https://github.com/cypress-io/cypress-webpack-preprocessor/issues","files":["*.js"],"private":false,"homepage":"https://github.com/cypress-io/cypress-webpack-preprocessor#readme","keywords":["cypress","cypress-plugin","cypress-preprocessor","webpack"],"license":"MIT","repository":{"type":"git","url":"https://github.com/cypress-io/cypress-webpack-preprocessor.git"},"scripts":{"ban":"ban","deps":"deps-ok && dependency-check --no-dev .","license":"license-checker --production --onlyunknown --csv","lint":"eslint --fix *.js","pretest":"npm run lint","secure":"nsp check","size":"t=\"$(npm pack .)\"; wc -c \"${t}\"; tar tvf \"${t}\"; rm \"${t}\";","test":"mocha","test-watch":"chokidar '*.js' 'test/*.js' -c 'mocha'","semantic-release":"semantic-release pre && npm publish --access public && semantic-release post"},"devDependencies":{"@babel/core":"^7.0.1","@babel/preset-env":"^7.0.0","babel-loader":"^8.0.2","ban-sensitive-files":"1.9.0","chai":"4.1.2","chokidar-cli":"1.2.0","condition-circle":"1.5.0","dependency-check":"2.9.1","deps-ok":"1.2.1","dont-crack":"1.2.1","eslint":"4.6.1","eslint-plugin-cypress-dev":"1.1.1","eslint-plugin-mocha":"4.11.0","github-post-release":"1.13.1","license-checker":"13.0.3","mocha":"3.5.0","mockery":"2.1.0","nsp":"2.7.0","prettier-eslint-cli":"4.4.0","semantic-release":"8.2.0","simple-commit-message":"3.3.1","sinon":"3.2.1","sinon-chai":"2.13.0","webpack":"^4.18.1"},"peerDependencies":{"webpack":"^4.18.1"},"optionalDependencies":{"@babel/core":"^7.0.1","@babel/preset-env":"^7.0.0","babel-loader":"^8.0.2"},"dependencies":{"bluebird":"3.5.0","debug":"3.1.0"},"release":{"verifyConditions":"condition-circle","analyzeCommits":"simple-commit-message","generateNotes":"github-post-release","verifyRelease":{"path":"dont-crack","test-against":[]}}} |
@@ -51,2 +51,3 @@ # Cypress Webpack Preprocessor [![CircleCI](https://circleci.com/gh/cypress-io/cypress-webpack-preprocessor.svg?style=svg)](https://circleci.com/gh/cypress-io/cypress-webpack-preprocessor) [![semantic-release][semantic-image] ][semantic-url] | ||
const webpack = require('@cypress/webpack-preprocessor') | ||
module.exports = (on) => { | ||
@@ -97,2 +98,25 @@ const options = { | ||
### additionalEntries | ||
An array of file path strings for additional entries to be included in the bundle. | ||
By necessity, this preprocessor sets the entry point for webpack as the spec file or support file. The `additionalEntries` option allows you to specify more entry points in order to utilize webpack's [multi-main entry](https://webpack.js.org/concepts/entry-points/#single-entry-shorthand-syntax). This allows runtime dependency resolution. | ||
**Default**: `[]` | ||
**Example**: | ||
```javascript | ||
const webpack = require('@cypress/webpack-preprocessor') | ||
module.exports = (on) => { | ||
const options = { | ||
webpackOptions: require('../../webpack.config'), | ||
additionalEntries: ['./app/some-module.js'], | ||
} | ||
on('file:preprocessor', webpack(options)) | ||
} | ||
``` | ||
## Modifying default options | ||
@@ -99,0 +123,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14347
184
159