File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
app/src/sandbox/eval/presets/parcel/transpilers Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -122,6 +122,16 @@ self.addEventListener('message', async event => {
122122 if ( node . tag === 'a' && node . attrs [ attr ] . lastIndexOf ( '.' ) < 1 ) {
123123 continue ;
124124 }
125+
126+ if (
127+ node . tag === 'html' &&
128+ node . attrs [ attr ] . endsWith ( '.html' ) &&
129+ attr === 'href'
130+ ) {
131+ // Another HTML file, we'll compile it when the user goes to it
132+ continue ;
133+ }
134+
125135 if ( elements && elements . includes ( node . tag ) ) {
126136 const result = addDependency ( node . attrs [ attr ] ) ;
127137
Original file line number Diff line number Diff line change @@ -10,6 +10,13 @@ class ParcelTemplate extends Template {
1010 getEntries ( configurationFiles : { [ type : string ] : Object } ) {
1111 const entries = [ ] ;
1212
13+ if ( typeof document !== 'undefined' ) {
14+ // Push the location of the address bar, eg. when someone has a file
15+ // /2.html open, you actually want to have that as entry point instead
16+ // of index.html.
17+ entries . push ( document . location . pathname ) ;
18+ }
19+
1320 entries . push (
1421 configurationFiles . package &&
1522 configurationFiles . package . parsed &&
You can’t perform that action at this time.
0 commit comments