[英]ASP.NET Core Template Pack and angular 1 app in same project
I have successfully created Angular 2 app using ASP.NET Core Template Pack every thing is working fine, no issues 我已经使用ASP.NET核心模板包成功创建了Angular 2应用程序,每件事都运行正常,没有问题
but now I have a Angular 1 App created (working on a different MVC controller) with type script in a another folder (all are .ts files) I need to configure the project to create .js file when ever I update Angular 1 app. 但是现在我创建了一个Angular 1应用程序(在不同的MVC控制器上工作),在另一个文件夹中使用类型脚本(所有都是.ts文件)我需要配置项目以创建.js文件,当我更新Angular 1应用程序时。
Can I place a tsconfig.json file to create .js file to a folder from the Angular 1 app ? 我可以放置一个tsconfig.json文件来创建.js文件到Angular 1应用程序的文件夹吗? can some one please let me know the steps to do this.
有人可以告诉我这样做的步骤。
Thank you in advance Asanka 提前谢谢Asanka
Answering my own question, 回答我自己的问题,
Current "webpack.config.js" has the 目前“webpack.config.js”有
module.exports = [clientBundleConfig, serverBundleConfig];
Create a separate config section after exciting config like this 在激发这样的配置后创建一个单独的配置部分
var ng1appConfig = merge(sharedConfig,
{
entry:
{
fileName1: './ClientApp/app/folder/fileName1.ts',
fileName2: './ClientApp/app/folder/fileName2.ts',
......
......
},
output: {
path: path.join(__dirname, './wwwroot/ng1app'),
filename: "[name].js"
}
});
module.exports =[clientBundleConfig, serverBundleConfig, ng1appConfig ];
this will create .js file for each .ts file in the output folder 这将为输出文件夹中的每个.ts文件创建.js文件
Have Fun 玩得开心
NeroIsNoHero NeroIsNoHero
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.