發(fā)布線上測(cè)試版本的時(shí)候打包出錯(cuò),前面有打包成功過(guò),現(xiàn)在添加了幾個(gè)新的文件,報(bào)錯(cuò),想請(qǐng)教如果是文件怎么怎么去排查錯(cuò)誤呢
package.js
webpack
/*
* @Author: sunnie.Song
* @Date: 2017-12-09 17:02:20
* @Last Modified by: sunnie.Song
* @Last Modified time: 2018-01-13 14:22:50
*/
var webpack = require("webpack");
var ExtractTextPlugin = require("extract-text-webpack-plugin");
var HtmlWebpackPlugin = require("html-webpack-plugin");
// 環(huán)境變量配置,dev / online
var WEBPACK_ENV = process.env.WEBPACK_ENV || "dev";
// 獲取html-webpack-plugin參數(shù)的方法
var getHtmlConfig = function(name, title) {
return {
template: "./src/view/" + name + ".html",
filename: "view/" + name + ".html",
title: title,
favicon: "./favicon.ico",
inject: true,
hash: true,
chunks: ["common", name]
};
};
// webpack config
var config = {
entry: {
common: ["./src/page/common/index.js"],
index: ["./src/page/index/index.js"],
result: ["./src/page/result/index.js"],
404: ["./src/page/404/index.js"],
register: ["./src/page/register/index.js"],
regsuccess: ["./src/page/regsuccess/index.js"],
login: ["./src/page/login/index.js"],
"product/search": ["./src/page/product/search/index.js"],
"product/goodslist": ["./src/page/product/goodslist/index.js"],
"product/detail": ["./src/page/product/detail/index.js"],
"product/download": ["./src/page/product/download/index.js"],
"user-center/index": ["./src/page/user-center/index.js"],
"user-account/account": ["./src/page/user-account/account/index.js"],
"user-account/wallet": ["./src/page/user-account/wallet/index.js"],
"user-account/address": ["./src/page/user-account/address/index.js"],
"user-account/invoice-setting": [
"./src/page/user-account/invoice-setting/index.js"
],
"user-account/set-pwd": ["./src/page/user-account/set-pwd/index.js"],
"user-account/reset-pwd": ["./src/page/user-account/reset-pwd/index.js"],
"user-account/forget-pwd": ["./src/page/user-account/forget-pwd/index.js"],
"user-account/bind-phone": ["./src/page/user-account/bind-phone/index.js"],
"user-account/change-phone": [
"./src/page/user-account/change-phone/index.js"
],
"user-account/bind-email": ["./src/page/user-account/bind-email/index.js"],
"user-account/change-email": [
"./src/page/user-account/change-email/index.js"
],
// "user-account/certification": [
// "./src/page/user-account/certification/index.js"
// ],
// "user-account/set-pay": ["./src/page/user-account/set-pay/index.js"],
"user-message/service": ["./src/page/user-message/service/index.js"],
"user-trade/order": ["./src/page/user-trade/order/index.js"],
// "user-trade/orderdetail": ["./src/page/user-trade/orderdetail/index.js"],
"user-trade/confirm": ["./src/page/user-trade/confirm/index.js"],
"user-refund/apply": ["./src/page/user-refund/apply/index.js"],
"cart/index": ["./src/page/cart/index/index.js"],
"cart/confirm-order": ["./src/page/cart/confirm-order/index.js"],
"cart/confirm-order-success": [
"./src/page/cart/confirm-order-success/index.js"
]
},
output: {
path: __dirname + "/dist/",
publicPath: "http://www.sportjx.com/dist/",
filename: "js/[name].js"
},
externals: {
jquery: "window.jQuery"
},
module: {
loaders: [
{
test: /\.css$/,
loader: ExtractTextPlugin.extract("style-loader", "css-loader")
},
{
test: /\.(gif|png|jpg|woff|svg|eot|ttf)\??.*$/,
loader: "url-loader?limit=100&name=resource/[name].[ext]"
},
{
test: /\.string$/,
loader: "html-loader",
query: {
minimize: true,
removeAttributeQuotes: false
}
}
]
},
resolve: {
alias: {
node_modules: __dirname + "/node_modules",
util: __dirname + "/src/util",
page: __dirname + "/src/page",
service: __dirname + "/src/service",
image: __dirname + "/src/image",
fonts: __dirname + "/src/fonts"
}
},
plugins: [
// 獨(dú)立通用模塊到j(luò)s/base.js
new webpack.optimize.CommonsChunkPlugin({
name: "common",
filename: "js/base.js"
}),
// new webpack.HotModuleReplacementPlugin(),
// 把css單獨(dú)打包到文件里
new ExtractTextPlugin("css/[name].css"),
// html模板的處理
new HtmlWebpackPlugin(getHtmlConfig("index", "首頁(yè)")),
new HtmlWebpackPlugin(getHtmlConfig("result", "操作結(jié)果")),
new HtmlWebpackPlugin(getHtmlConfig("404", "出差錯(cuò)了")),
new HtmlWebpackPlugin(getHtmlConfig("register", "注冊(cè)")),
new HtmlWebpackPlugin(getHtmlConfig("regsuccess", "注冊(cè)成功")),
new HtmlWebpackPlugin(getHtmlConfig("login", "登錄")),
new HtmlWebpackPlugin(getHtmlConfig("product/search", "商品搜索列表")),
new HtmlWebpackPlugin(getHtmlConfig("product/download", "庫(kù)存下載")),
new HtmlWebpackPlugin(getHtmlConfig("product/goodslist", "商品列表")),
new HtmlWebpackPlugin(getHtmlConfig("product/detail", "商品詳情")),
new HtmlWebpackPlugin(getHtmlConfig("user-center/index", "我的云商操作臺(tái)")),
new HtmlWebpackPlugin(
getHtmlConfig("user-account/account", "賬號(hào)管理-我的云商操作臺(tái)")
),
new HtmlWebpackPlugin(getHtmlConfig("user-account/wallet", "余額賬號(hào)-我的云商操作臺(tái)")),
new HtmlWebpackPlugin(
getHtmlConfig("user-account/address", "收貨地址-我的云商操作臺(tái)")
),
new HtmlWebpackPlugin(
getHtmlConfig("user-account/invoice-setting", "開(kāi)票設(shè)置-我的云商操作臺(tái)")
),
new HtmlWebpackPlugin(
getHtmlConfig("user-account/set-pwd", "設(shè)置密碼-我的云商操作臺(tái)")
),
new HtmlWebpackPlugin(
getHtmlConfig("user-account/reset-pwd", "修改密碼-我的云商操作臺(tái)")
),
new HtmlWebpackPlugin(
getHtmlConfig("user-account/forget-pwd", "忘記密碼-我的云商操作臺(tái)")
),
new HtmlWebpackPlugin(
getHtmlConfig("user-account/bind-phone", "綁定手機(jī)-我的云商操作臺(tái)")
),
new HtmlWebpackPlugin(
getHtmlConfig("user-account/change-phone", "修改手機(jī)-我的云商操作臺(tái)")
),
new HtmlWebpackPlugin(
getHtmlConfig("user-account/bind-email", "綁定郵箱-我的云商操作臺(tái)")
),
new HtmlWebpackPlugin(
getHtmlConfig("user-account/change-email", "修改郵箱-我的云商操作臺(tái)")
),
// new HtmlWebpackPlugin(
// getHtmlConfig("user-account/set-pay", "設(shè)置余額密碼-我的云商操作臺(tái)")
// ),
// new HtmlWebpackPlugin(
// getHtmlConfig("user-account/certification", "實(shí)名認(rèn)證-我的云商操作臺(tái)")
// ),
new HtmlWebpackPlugin(
getHtmlConfig("user-message/service", "服務(wù)消息-我的云商操作臺(tái)")
),
new HtmlWebpackPlugin(getHtmlConfig("user-trade/order", "交易訂單-我的云商操作臺(tái)")),
// new HtmlWebpackPlugin(getHtmlConfig("user-trade/orderdetail", "訂單詳情")),
new HtmlWebpackPlugin(getHtmlConfig("user-trade/confirm", "確認(rèn)收貨")),
new HtmlWebpackPlugin(getHtmlConfig("user-refund/apply", "申請(qǐng)售后")),
new HtmlWebpackPlugin(getHtmlConfig("cart/index", "購(gòu)物車(chē)")),
new HtmlWebpackPlugin(getHtmlConfig("cart/confirm-order", "確認(rèn)訂單")),
new HtmlWebpackPlugin(getHtmlConfig("cart/confirm-order-success", "提交訂單成功"))
]
/* devServer: {
contentBase: __dirname + "/dist/view", // 當(dāng)前服務(wù)器監(jiān)聽(tīng)的路徑
hot: true, // 熱更新
port: 8088, // 定義端口號(hào)
host: "localhost",
open: true // 是否自動(dòng)打開(kāi)瀏覽器
}*/
};
if ("dev" === WEBPACK_ENV) {
config.entry.common.push("webpack-dev-server/client?http://localhost:8088/");
}
module.exports = config;
北大青鳥(niǎo)APTECH成立于1999年。依托北京大學(xué)優(yōu)質(zhì)雄厚的教育資源和背景,秉承“教育改變生活”的發(fā)展理念,致力于培養(yǎng)中國(guó)IT技能型緊缺人才,是大數(shù)據(jù)專(zhuān)業(yè)的國(guó)家
北大青鳥(niǎo)中博軟件學(xué)院創(chuàng)立于2003年,作為華東區(qū)著名互聯(lián)網(wǎng)學(xué)院和江蘇省首批服務(wù)外包人才培訓(xùn)基地,中博成功培育了近30000名軟件工程師走向高薪崗位,合作企業(yè)超4
中公教育集團(tuán)創(chuàng)建于1999年,經(jīng)過(guò)二十年潛心發(fā)展,已由一家北大畢業(yè)生自主創(chuàng)業(yè)的信息技術(shù)與教育服務(wù)機(jī)構(gòu),發(fā)展為教育服務(wù)業(yè)的綜合性企業(yè)集團(tuán),成為集合面授教學(xué)培訓(xùn)、網(wǎng)
達(dá)內(nèi)教育集團(tuán)成立于2002年,是一家由留學(xué)海歸創(chuàng)辦的高端職業(yè)教育培訓(xùn)機(jī)構(gòu),是中國(guó)一站式人才培養(yǎng)平臺(tái)、一站式人才輸送平臺(tái)。2014年4月3日在美國(guó)成功上市,融資1
曾工作于聯(lián)想擔(dān)任系統(tǒng)開(kāi)發(fā)工程師,曾在博彥科技股份有限公司擔(dān)任項(xiàng)目經(jīng)理從事移動(dòng)互聯(lián)網(wǎng)管理及研發(fā)工作,曾創(chuàng)辦藍(lán)懿科技有限責(zé)任公司從事總經(jīng)理職務(wù)負(fù)責(zé)iOS教學(xué)及管理工作。
浪潮集團(tuán)項(xiàng)目經(jīng)理。精通Java與.NET 技術(shù), 熟練的跨平臺(tái)面向?qū)ο箝_(kāi)發(fā)經(jīng)驗(yàn),技術(shù)功底深厚。 授課風(fēng)格 授課風(fēng)格清新自然、條理清晰、主次分明、重點(diǎn)難點(diǎn)突出、引人入勝。
精通HTML5和CSS3;Javascript及主流js庫(kù),具有快速界面開(kāi)發(fā)的能力,對(duì)瀏覽器兼容性、前端性能優(yōu)化等有深入理解。精通網(wǎng)頁(yè)制作和網(wǎng)頁(yè)游戲開(kāi)發(fā)。
具有10 年的Java 企業(yè)應(yīng)用開(kāi)發(fā)經(jīng)驗(yàn)。曾經(jīng)歷任德國(guó)Software AG 技術(shù)顧問(wèn),美國(guó)Dachieve 系統(tǒng)架構(gòu)師,美國(guó)AngelEngineers Inc. 系統(tǒng)架構(gòu)師。