Modify path of front-end resources

This commit is contained in:
Pig Fang 2018-10-19 21:42:14 +08:00
parent ca7c7087ff
commit 12539d5f9d
6 changed files with 10 additions and 10 deletions

View File

@ -57,7 +57,7 @@ if (! function_exists('webpack_assets')) {
if (app()->environment('development')) {
return "http://127.0.0.1:8080/public/$relativeUri";
} else {
return url("public/$relativeUri");
return url("app/$relativeUri");
}
}
}

View File

@ -12,7 +12,7 @@ return [
'api_type' => 'false',
'announcement' => 'Welcome to Blessing Skin {version}!',
'color_scheme' => 'skin-blue',
'home_pic_url' => './public/bg.jpg',
'home_pic_url' => './app/bg.jpg',
'custom_css' => '',
'custom_js' => '',
'player_name_rule' => 'official',
@ -42,5 +42,5 @@ return [
'plugins_enabled' => '',
'copyright_prefer' => '0',
'score_per_closet_item' => '0',
'favicon_url' => 'public/favicon.ico'
'favicon_url' => 'app/favicon.ico'
];

View File

@ -11,7 +11,7 @@
"private": true,
"scripts": {
"dev": "webpack-serve",
"build": "rimraf public && node scripts/build",
"build": "rimraf public/app && node scripts/build",
"lint": "eslint --ext=.js,.vue -f=beauty .",
"test": "jest",
"codecov": "codecov -F js",

View File

@ -1,4 +1,4 @@
// eslint-disable-next-line no-undef
__webpack_public_path__ = process.env.NODE_ENV === 'development'
? 'http://127.0.0.1:8080/public/'
: blessing.base_url + '/public/';
? 'http://127.0.0.1:8080/'
: blessing.base_url + '/app/';

View File

@ -1,10 +1,10 @@
@if (file_exists(public_path($path = 'langs/'.config('app.locale').'.js')))
<script src="{{ url('public/'.$path) }}"></script>
@if (file_exists(public_path($path = 'app/langs/'.config('app.locale').'.js')))
<script src="{{ url($path) }}"></script>
@if (file_exists(resource_path($path = 'lang/overrides/'.config('app.locale').'/locale.js')))
<script src="{{ url('resources/'.$path) }}"></script>
@endif
@else
<script src="{{ url('public/langs/'.config('app.fallback_locale').'.js') }}"></script>
<script src="{{ url('app/langs/'.config('app.fallback_locale').'.js') }}"></script>
@if (file_exists(resource_path($path = 'lang/overrides/'.config('app.fallback_locale').'/locale.js')))
<script src="{{ url('resources/'.$path) }}"></script>
@endif

View File

@ -29,7 +29,7 @@ const config = {
'langs/zh_CN': './resources/lang/zh_CN/front-end.js',
},
output: {
path: __dirname + '/public',
path: __dirname + '/public/app',
filename: '[name].js',
chunkFilename: devMode
? '[id].js'