加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
webpack.config.js 1.07 KB
一键复制 编辑 原始数据 按行查看 历史
mathfan 提交于 2016-07-06 17:47 . first commit
var path = require('path');
module.exports = {
entry: [
path.normalize('es6-shim/es6-shim.min'),
'reflect-metadata',
path.normalize('zone.js/dist/zone-microtask'),
path.resolve('app/app')
],
output: {
path: path.resolve('www/build/js'),
filename: 'app.bundle.js',
pathinfo: false // show module paths in the bundle, handy for debugging
},
module: {
loaders: [
{
test: /\.ts$/,
loader: 'awesome-typescript',
query: {
doTypeCheck: true,
resolveGlobs: false,
externals: ['typings/browser.d.ts']
},
include: path.resolve('app'),
exclude: /node_modules/
},
{
test: /\.js$/,
include: path.resolve('node_modules/angular2'),
loader: 'strip-sourcemap'
}
],
noParse: [
/es6-shim/,
/reflect-metadata/,
/zone\.js(\/|\\)dist(\/|\\)zone-microtask/
]
},
resolve: {
root: ['app'],
alias: {
'angular2': path.resolve('node_modules/angular2')
},
extensions: ["", ".js", ".ts"]
}
};
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化