@@ -801,6 +801,30 @@ describe('Functional tests using webpack', function() {
801
801
} ) ;
802
802
} ) ;
803
803
804
+ it ( 'createdSharedEntry() works with source maps enabled' , ( done ) => {
805
+ const config = createWebpackConfig ( 'www/build' , 'dev' ) ;
806
+ config . setPublicPath ( '/build' ) ;
807
+ config . addEntry ( 'main' , [ './js/no_require' , './js/code_splitting' , './js/arrow_function' , './js/print_to_app' ] ) ;
808
+ config . addEntry ( 'other' , [ './js/no_require' , './css/h1_style.css' ] ) ;
809
+ config . createSharedEntry ( 'shared' , './js/shared_example' ) ;
810
+ config . enableSourceMaps ( true ) ;
811
+
812
+ testSetup . runWebpack ( config , ( webpackAssert ) => {
813
+ testSetup . requestTestPage (
814
+ path . join ( config . getContext ( ) , 'www' ) ,
815
+ [
816
+ convertToManifestPath ( 'build/runtime.js' , config ) ,
817
+ convertToManifestPath ( 'build/shared.js' , config ) ,
818
+ ] ,
819
+ ( browser ) => {
820
+ // assert that the javascript brought into shared is executed
821
+ browser . assert . text ( '#app' , 'Welcome to Encore!' ) ;
822
+ done ( ) ;
823
+ }
824
+ ) ;
825
+ } ) ;
826
+ } ) ;
827
+
804
828
it ( 'in production mode, code is uglified' , ( done ) => {
805
829
const config = createWebpackConfig ( 'www/build' , 'production' ) ;
806
830
config . setPublicPath ( '/build' ) ;
0 commit comments