有没有办法看到哪些文件包含在webpack构建中,最好是它们的大小?我想要这个的原因是为了深入了解我的构建,并留意意外包含不应该在那里的文件.
我正在尝试重定向/仪表板/到/仪表板/覆盖/人口统计,如果网址命中/仪表板/.
问题是,如果我点击像**/仪表板/流量这样的子路由,我仍然会被重定向到/ dashboard/reach/demographic /.
Ember的做法是什么?
这是我的代码:
(function() {
App.Router.map(function(match) {
this.resource('dashboard', function() {
this.resource('traffic', function() {
this.route('visits');
this.route('pageviews');
return this.route('duration');
});
return this.resource('reach', function() {
this.route('demographics');
this.route('over_time');
return this.route('devices');
});
});
return this.route('audience');
});
App.DashboardRoute = Ember.Route.extend({
redirect: function() {
return this.transitionTo('reach.demographics');
}
});
if (!App.ie()) {
App.Router.reopen({
location: 'history'
});
}
App.reopen({
rootUrl: '/'
});
}).call(this);
Run Code Online (Sandbox Code Playgroud)