Skip to content

Commit 34dd31e

Browse files
committed
fix(webpack): fix some conditionals
1 parent 8fa3e0a commit 34dd31e

File tree

1 file changed

+6
-3
lines changed
  • templates/app/client/app

1 file changed

+6
-3
lines changed

Diff for: templates/app/client/app/app.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ import footer from '../components/footer/footer.component';
2828
import main from './main/main.component';
2929
import './app.constant';
3030
import util from '../components/util/util.module';
31-
import socket from '../components/socket/socket.service';
31+
<%_ if(filters.socketio) { _%>
32+
import socket from '../components/socket/socket.service';<% } %>
3233

3334

3435
import './app.<%= styleExt %>';
@@ -56,10 +57,12 @@ angular.module('<%= scriptAppName %>', [
5657
footer,
5758
main,
5859
'<%= scriptAppName %>.constants',
59-
socket,
60+
<%_ if(filters.socketio) { _%>
61+
socket,<% } %>
6062
util
6163
])
6264
.config(routeConfig)
65+
<%_ if(filters.auth) { _%>
6366
.run(function($rootScope, $location, Auth) {
6467
'ngInject';
6568
// Redirect to login if route requires auth and you're not logged in
@@ -70,7 +73,7 @@ angular.module('<%= scriptAppName %>', [
7073
}
7174
});
7275
});
73-
});
76+
})<% } %>;
7477

7578
angular
7679
.element(document)

0 commit comments

Comments
 (0)