3 Star 0 Fork 0

陈先森/web-site

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
webpack.config.js 1.34 KB
一键复制 编辑 原始数据 按行查看 历史
qiruiyin 提交于 2016-08-18 14:09 . master: js重写
var webpack = require('webpack');
module.exports = {
entry: "./app/js/app.ts",
output: {
filename: "./app/js/app.js",
},
// Enable sourcemaps for debugging webpack's output.
devtool: "source-map",
resolve: {
// Add '.ts' and '.tsx' as resolvable extensions.
extensions: ["", ".webpack.js", ".web.js", ".ts", ".tsx", ".js"]
},
module: {
loaders: [
// All files with a '.ts' or '.tsx' extension will be handled by 'ts-loader'.
{ test: /\.tsx?$/, loader: "ts-loader" }
],
preLoaders: [
// All output '.js' files will have any sourcemaps re-processed by 'source-map-loader'.
{ test: /\.js$/, loader: "source-map-loader" }
]
},
// When importing a module whose path matches one of the following, just
// assume a corresponding global variable exists and use that instead.
// This is important because it allows us to avoid bundling all of our
// dependencies, which allows browsers to cache those libraries between builds.
// externals: {
// "react": "React",
// "react-dom": "ReactDOM"
// },
plugins: [
// 压缩混淆
// new webpack.optimize.UglifyJsPlugin({
// compress: {
// warnings:false
// }
// }),
],
watch: true
};
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
HTML
1
https://gitee.com/shjht/web-site.git
git@gitee.com:shjht/web-site.git
shjht
web-site
web-site
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385