@@ -762,28 +762,25 @@ describe('Functional tests using webpack', function() {
762762 config . addEntry ( 'page2' , './preact/main' ) ;
763763
764764 // Move Vue.js code into its own chunk
765- const isVue2 = getVueVersion ( config ) === 2 ;
766765 config . addCacheGroup ( 'vuejs' , {
767- test : isVue2 ?
768- / [ \\ / ] n o d e _ m o d u l e s [ \\ / ] v u e [ \\ / ] / :
769- / [ \\ / ] n o d e _ m o d u l e s [ \\ / ] @ v u e [ \\ / ] /
766+ test : / [ \\ / ] n o d e _ m o d u l e s [ \\ / ] @ v u e [ \\ / ] /
770767 } ) ;
771768
772769 testSetup . runWebpack ( config , ( webpackAssert ) => {
773770 // Vue.js code should be present in common.js but not in page1.js/page2.js
774771 webpackAssert . assertOutputFileContains (
775772 'vuejs.js' ,
776- ` /***/ "../../node_modules/${ isVue2 ? 'vue' : ' @vue' } /`
773+ ' /***/ "../../node_modules/@vue/'
777774 ) ;
778775
779776 webpackAssert . assertOutputFileDoesNotContain (
780777 'page1.js' ,
781- ` /***/ "../../node_modules/${ isVue2 ? 'vue' : ' @vue' } /`
778+ ' /***/ "../../node_modules/@vue/'
782779 ) ;
783780
784781 webpackAssert . assertOutputFileDoesNotContain (
785782 'page2.js' ,
786- ` /***/ "../../node_modules/${ isVue2 ? 'vue' : ' @vue' } /`
783+ ' /***/ "../../node_modules/@vue/'
787784 ) ;
788785
789786 // Preact code should be present in page2.js only
@@ -842,10 +839,9 @@ describe('Functional tests using webpack', function() {
842839 config . addEntry ( 'page2' , './preact/main' ) ;
843840
844841 // Move both vue.js and preact code into their own chunk
845- const isVue2 = getVueVersion ( config ) === 2 ;
846842 config . addCacheGroup ( 'common' , {
847843 node_modules : [
848- isVue2 ? 'vue' : '@vue' ,
844+ '@vue' ,
849845 'preact'
850846 ]
851847 } ) ;
@@ -854,17 +850,17 @@ describe('Functional tests using webpack', function() {
854850 // Vue.js code should be present in common.js but not in page1.js/page2.js
855851 webpackAssert . assertOutputFileContains (
856852 'common.js' ,
857- ` /***/ "../../node_modules/${ isVue2 ? 'vue' : ' @vue' } /`
853+ ' /***/ "../../node_modules/@vue/'
858854 ) ;
859855
860856 webpackAssert . assertOutputFileDoesNotContain (
861857 'page1.js' ,
862- ` /***/ "../../node_modules/${ isVue2 ? 'vue' : ' @vue' } /`
858+ ' /***/ "../../node_modules/@vue/'
863859 ) ;
864860
865861 webpackAssert . assertOutputFileDoesNotContain (
866862 'page2.js' ,
867- ` /***/ "../../node_modules/${ isVue2 ? 'vue' : ' @vue' } /`
863+ ' /***/ "../../node_modules/@vue/'
868864 ) ;
869865
870866 // Preact code should be present in common.js but not in page1.js/page2.js
0 commit comments