fix: running on gitpod
This commit is contained in:
parent
6ebe817b47
commit
190642224d
|
|
@ -4,6 +4,8 @@ tasks:
|
||||||
- init: composer install
|
- init: composer install
|
||||||
command: |
|
command: |
|
||||||
cp .env.example .env
|
cp .env.example .env
|
||||||
|
mkdir public/app/
|
||||||
|
cp resources/assets/src/images/bg.webp resources/assets/src/images/favicon.ico public/app
|
||||||
touch storage/database.db
|
touch storage/database.db
|
||||||
sed 's/DB_CONNECTION=mysql/DB_CONNECTION=sqlite/' -i .env
|
sed 's/DB_CONNECTION=mysql/DB_CONNECTION=sqlite/' -i .env
|
||||||
sed 's/DB_DATABASE=blessingskin/DB_DATABASE=\/workspace\/blessing-skin-server\/storage\/database\.db/' -i .env
|
sed 's/DB_DATABASE=blessingskin/DB_DATABASE=\/workspace\/blessing-skin-server\/storage\/database\.db/' -i .env
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,8 @@
|
||||||
declare let __webpack_public_path__: string
|
declare let __webpack_public_path__: string
|
||||||
|
declare const __blessing_public_path__: string
|
||||||
|
|
||||||
if (process.env.NODE_ENV === 'development') {
|
if (process.env.NODE_ENV === 'development') {
|
||||||
const url = new URL(blessing.base_url)
|
__webpack_public_path__ = __blessing_public_path__
|
||||||
url.port = '8080'
|
|
||||||
url.pathname = '/app/'
|
|
||||||
__webpack_public_path__ = url.toString()
|
|
||||||
} else {
|
} else {
|
||||||
const link = document.querySelector<HTMLLinkElement>('link#cdn-host')
|
const link = document.querySelector<HTMLLinkElement>('link#cdn-host')
|
||||||
const base = link?.href ?? blessing.base_url
|
const base = link?.href ?? blessing.base_url
|
||||||
|
|
|
||||||
|
|
@ -123,6 +123,7 @@ export default function (env?: Env): webpack.Configuration[] {
|
||||||
version: {},
|
version: {},
|
||||||
},
|
},
|
||||||
'process.platform': '"browser"',
|
'process.platform': '"browser"',
|
||||||
|
__blessing_public_path__: JSON.stringify(htmlPublicPath),
|
||||||
}),
|
}),
|
||||||
].concat(isDev ? [new webpack.HotModuleReplacementPlugin()] : []),
|
].concat(isDev ? [new webpack.HotModuleReplacementPlugin()] : []),
|
||||||
resolve: {
|
resolve: {
|
||||||
|
|
@ -151,7 +152,9 @@ export default function (env?: Env): webpack.Configuration[] {
|
||||||
hot: true,
|
hot: true,
|
||||||
hotOnly: true,
|
hotOnly: true,
|
||||||
stats: 'errors-warnings',
|
stats: 'errors-warnings',
|
||||||
allowedHosts: isGitpod ? ['localhost', '.gitpod.io'] : undefined,
|
allowedHosts: ['localhost'].concat(
|
||||||
|
isDev && isGitpod ? ['.gitpod.io'] : [],
|
||||||
|
),
|
||||||
},
|
},
|
||||||
stats: 'errors-warnings',
|
stats: 'errors-warnings',
|
||||||
ignoreWarnings: [/size limit/i],
|
ignoreWarnings: [/size limit/i],
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user