@@ -1769,6 +1769,64 @@ describe('bundler', function () {
1769
1769
} ,
1770
1770
] ) ;
1771
1771
} ) ;
1772
+
1773
+ it ( 'should support globs matching outside of the project root' , async function ( ) {
1774
+ const rootDir = path . join ( dir , 'root' ) ;
1775
+ overlayFS . mkdirp ( rootDir ) ;
1776
+ await fsFixture ( overlayFS , rootDir ) `
1777
+ yarn.lock:
1778
+ // Required for config loading
1779
+
1780
+ package.json:
1781
+ {
1782
+ "@parcel/bundler-default": {
1783
+ "minBundleSize": 0,
1784
+ "manualSharedBundles": [{
1785
+ "name": "vendor",
1786
+ "root": "vendor.js",
1787
+ "assets": [
1788
+ "in-project.js",
1789
+ "../outside-project.js"
1790
+ ]
1791
+ }]
1792
+ }
1793
+ }
1794
+
1795
+ index.html:
1796
+ <script type="module" src="./index.js"></script>
1797
+
1798
+ in-project.js:
1799
+ export default 'in-project';
1800
+
1801
+ vendor.js:
1802
+ export * from './in-project';
1803
+ export * from '../outside-project';
1804
+
1805
+ index.js:
1806
+ import * as vendor from './vendor';
1807
+
1808
+ console.log(vendor.inProj);
1809
+ console.log(vendor.outProj);` ;
1810
+
1811
+ await fsFixture ( overlayFS , dir ) `
1812
+ outside-project.js:
1813
+ export default 'outside-project';` ;
1814
+
1815
+ let b = await bundle ( path . join ( rootDir , 'index.html' ) , {
1816
+ defaultTargetOptions : {
1817
+ shouldScopeHoist : false ,
1818
+ shouldOptimize : false ,
1819
+ sourceMaps : false ,
1820
+ } ,
1821
+ inputFS : overlayFS ,
1822
+ } ) ;
1823
+
1824
+ assertBundles ( b , [
1825
+ { assets : [ 'index.html' ] } ,
1826
+ { assets : [ 'in-project.js' , 'outside-project.js' ] } ,
1827
+ { assets : [ 'esmodule-helpers.js' , 'index.js' , 'vendor.js' ] } ,
1828
+ ] ) ;
1829
+ } ) ;
1772
1830
} ) ;
1773
1831
1774
1832
it ( 'should reuse type change bundles from parent bundle groups' , async function ( ) {
0 commit comments