'webpack设置ico'
This commit is contained in:
@@ -43,14 +43,23 @@ const config = {
|
||||
},
|
||||
},
|
||||
h5: {
|
||||
webpackChain (chain) {
|
||||
webpackChain(chain) {
|
||||
chain.module
|
||||
.rule('markdown')
|
||||
.rule("markdown")
|
||||
.test(/\.md$/)
|
||||
.use('raw-loader')
|
||||
.loader('raw-loader')
|
||||
.end();
|
||||
.use("raw-loader")
|
||||
.loader("raw-loader")
|
||||
.end();
|
||||
chain.module
|
||||
.rule("ico")
|
||||
.test(/\.ico$/)
|
||||
.use("file-loader")
|
||||
.loader("file-loader")
|
||||
.options({
|
||||
name: "static/images/[name].[ext]",
|
||||
});
|
||||
},
|
||||
|
||||
esnextModules: ["taro-ui"],
|
||||
publicPath: "/",
|
||||
staticDirectory: "static",
|
||||
@@ -86,20 +95,20 @@ const config = {
|
||||
// host: 'nomad.hackrobot.cn', // 替换为您的域名
|
||||
// port: 10087, // 选择一个适当的端口号
|
||||
proxy: {
|
||||
'/api/': {
|
||||
"/api/": {
|
||||
target: JSON.parse('"http://localhost:8700"'), //本地调试端口
|
||||
pathRewrite: {
|
||||
'^/api/': '/'
|
||||
"^/api/": "/",
|
||||
},
|
||||
changeOrigin: true
|
||||
}
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
// 允许特定域名访问
|
||||
allowedHosts: [
|
||||
// 'bot.hackrobot.cn'
|
||||
'nomadyt.com'
|
||||
"nomadyt.com",
|
||||
],
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user