@@ -43,13 +43,18 @@ class Stylesheet extends Base {
4343 super . construct ( config ) ;
4444
4545 let neoConfig = Neo . config ,
46+ env = neoConfig . environment ,
4647 faPath ;
4748
4849 if ( neoConfig . useFontAwesome ) {
49- if ( neoConfig . environment === 'development' || neoConfig . environment === 'dist/esm' ) {
50- faPath = neoConfig . basePath + 'node_modules/@fortawesome/fontawesome-free/css/all.min.css'
50+ if ( env === 'development' || env === 'dist/esm' ) {
51+ faPath = neoConfig . basePath + 'node_modules/@fortawesome/fontawesome-free/css/all.min.css' ;
52+
53+ if ( env === 'dist/esm' ) {
54+ faPath = '../../' + faPath
55+ }
5156 } else {
52- faPath = neoConfig . basePath . substr ( 6 ) + 'resources/fontawesome-free/css/all.min.css'
57+ faPath = neoConfig . basePath . substring ( 6 ) + 'resources/fontawesome-free/css/all.min.css'
5358 }
5459
5560 this . createStyleSheet ( null , null , faPath )
@@ -73,6 +78,10 @@ class Stylesheet extends Base {
7378
7479 document . body . classList . add ( themes [ 0 ] ) ;
7580
81+ if ( env === 'dist/esm' ) {
82+ path = '../../' + path ;
83+ }
84+
7685 folders . forEach ( folder => {
7786 if ( folder . startsWith ( 'neo-' ) ) {
7887 folder = folder . substring ( 4 )
@@ -100,6 +109,10 @@ class Stylesheet extends Base {
100109 promises = [ ] ,
101110 rootPath = config . basePath . substring ( 6 ) ;
102111
112+ if ( env === 'dist/esm' ) {
113+ path = '../../' + path ;
114+ }
115+
103116 if ( className . startsWith ( 'Neo.' ) ) {
104117 className = className . substring ( 4 )
105118 }
0 commit comments