mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2026-06-21 17:40:25 +08:00
提交 all-in-one 前端本地适配
This commit is contained in:
1
manager/.gitignore
vendored
1
manager/.gitignore
vendored
@@ -21,3 +21,4 @@ selenium-debug.log
|
||||
yarn.lock
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
public/config.local.js
|
||||
|
||||
@@ -71,7 +71,9 @@
|
||||
<% for(var js of htmlWebpackPlugin.options.cdn.js) { %>
|
||||
<script src="<%=js%>"></script>
|
||||
<% } %>
|
||||
<script src="/config.js"></script>
|
||||
<script src="<%= BASE_URL %>config.js"></script>
|
||||
<!-- 本地一键启动脚本会生成此文件,用于覆盖开发环境接口和跳转地址。 -->
|
||||
<script src="<%= BASE_URL %>config.local.js"></script>
|
||||
<script src="./tinymce/tinymce.min.js"></script>
|
||||
<noscript>
|
||||
<strong
|
||||
|
||||
@@ -10,6 +10,7 @@ Vue.use(VueRouter);
|
||||
// 路由配置
|
||||
const RouterConfig = {
|
||||
mode: 'history',
|
||||
base: process.env.BASE_URL,
|
||||
routes: routers
|
||||
};
|
||||
|
||||
@@ -53,4 +54,3 @@ router.afterEach((to) => {
|
||||
window.scrollTo(0, 0);
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ const resolve = dir => {
|
||||
* 我们可以根据环境变量进行相应的处理,只有在产品的时候,才让插件去自动注入相应的资源文件到html页面
|
||||
*/
|
||||
const enableProduction = process.env.NODE_ENV === "production"; // 是否生产环境
|
||||
const publicPath = process.env.VUE_APP_PUBLIC_PATH || "/";
|
||||
|
||||
|
||||
let externals = {
|
||||
@@ -66,6 +67,7 @@ cdn = enableProduction && configs.enableCDN ? cdn : { css: [], js: [] };
|
||||
externals = enableProduction && configs.enableCDN ? externals : {};
|
||||
jsPlugin = enableProduction ? jsPlugin : [];
|
||||
module.exports = {
|
||||
publicPath,
|
||||
css: {
|
||||
loaderOptions: {
|
||||
// 向 CSS 相关的 loader 传递选项
|
||||
|
||||
Reference in New Issue
Block a user