File tree Expand file tree Collapse file tree 2 files changed +25
-15
lines changed Expand file tree Collapse file tree 2 files changed +25
-15
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ function _appendStyles(dest, styles) {
15
15
}
16
16
17
17
class ApplicationContainer extends HTMLElement {
18
- #styles = ( config . webComponentsAssets || { } ) . styles
18
+ #styles = ( config . webComponentsAssets || { } ) . css
19
19
#shadowRoot
20
20
#application
21
21
Original file line number Diff line number Diff line change 3
3
module . exports = {
4
4
name : require ( './package' ) . name ,
5
5
config ( env , config ) {
6
- if ( ! this . app ) {
6
+ let app = this . _findHost ( )
7
+ if ( ! app ) {
7
8
return ;
8
9
}
9
- this . app . options . storeConfigInMeta = false ;
10
- this . app . options . autoRun = false ;
10
+ app . options . storeConfigInMeta = false ;
11
+ app . options . autoRun = false ;
12
+
13
+ let assets = this . _findAssets ( app . options . outputPaths )
11
14
return {
12
- webComponentsAssets : {
13
- styles : this . _styles
14
- }
15
+ webComponentsAssets : assets
16
+
15
17
}
16
18
} ,
17
19
included ( addon ) {
18
- let { options } = addon
19
- let styles = {
20
- // Why tho?? The structure of options.outputPaths is weird and inconsistent
21
- ...options . outputPaths . app . css ,
22
- vendor : options . outputPaths . vendor . css
20
+ this . app . import ( 'vendor/register-components.js' )
21
+ } ,
22
+ _findAssets ( paths ) {
23
+ let {
24
+ app : {
25
+ css : appCss ,
26
+ js : appJs
27
+ } ,
28
+ vendor : {
29
+ css : vendorCss ,
30
+ js : vendorJs
31
+ }
32
+ } = paths
33
+ return {
34
+ css : { ...appCss , vendor : vendorCss } ,
35
+ js : { app : appJs , vendor : vendorJs }
23
36
}
24
37
25
- this . _styles = styles
26
-
27
- this . app . import ( 'vendor/register-components.js' )
28
38
}
29
39
} ;
You can’t perform that action at this time.
0 commit comments