【发布时间】:2016-12-08 11:12:47
【问题描述】:
所以对于out app,要求所有的URL都有.app扩展名...
所以http://domain/news.app http://domain/article.app?blah=blah
虽然这在生产(apache)服务器上运行良好(实际解析扩展)但它在我的 webpack 开发服务器上不起作用......或者至少我找不到任何设置来使它工作
例如,在我的 Angular 应用程序路线中,我有这个
const appRoutes: Routes = [
{ path: 'home.app', pathMatch: 'full', component: AppPage},
{ path: 'news.app', pathMatch: 'full', component: AppNews}
];
webpack.dev 配置
output: {
path: helpers.root('dist'),
publicPath: 'http://localhost:8080/',
filename: '[name].js',
chunkFilename: '[id].chunk.js'
},
所以如果我这样做http://localhost:8080/news.app .... 我明白了
无法获取 /news.app
如何设置允许 /news.app 的开发服务器?
【问题讨论】:
标签: angular webpack webpack-dev-server