This repository was archived by the owner on Dec 12, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-22
lines changed Expand file tree Collapse file tree 2 files changed +7
-22
lines changed Original file line number Diff line number Diff line change 1- const webpack = require ( '@cypress/webpack-preprocessor' )
1+ // https://github.com/cypress-io/cypress-webpack-preprocessor
2+ const webpackPreprocessor = require ( '@cypress/webpack-preprocessor' )
3+
4+ // Cypress webpack options or just require from
5+ // an existing webpack.config.js
26const webpackOptions = {
37 module : {
48 rules : [
@@ -11,12 +15,9 @@ const webpackOptions = {
1115}
1216
1317const options = {
14- // send in the options from your webpack.config.js, so it works the same
15- // as your app's code
16- webpackOptions,
17- watchOptions : { }
18+ webpackOptions
1819}
1920
2021module . exports = on => {
21- on ( 'file:preprocessor' , webpack ( options ) )
22+ on ( 'file:preprocessor' , webpackPreprocessor ( options ) )
2223}
Original file line number Diff line number Diff line change @@ -67,8 +67,6 @@ const mountVue = (component, options = {}) => () => {
6767 const vueHtml = getPageHTML ( options )
6868 document . write ( vueHtml )
6969 document . close ( )
70- console . log ( 'wrote html' )
71- console . log ( vueHtml )
7270 } )
7371 cy
7472 . window ( )
@@ -81,17 +79,3 @@ const mountVue = (component, options = {}) => () => {
8179}
8280
8381module . exports = mountVue
84-
85- // export const loadAndMountMyComponent = VueComponent => () => {
86- // cy.visit('index.html')
87- // cy
88- // .window()
89- // .its('Vue')
90- // .then(Vue => {
91- // deleteCachedConstructors(VueComponent)
92- // // TODO go through ITS components and delete their constructors
93- // // wonder if there is unified list
94- // Cypress.vue = new Vue(VueComponent).$mount('#app')
95- // copyStyles(VueComponent)
96- // })
97- // }
You can’t perform that action at this time.
0 commit comments