fix: change the public path, fix image resource not loaded in production
This commit is contained in:
1 parent
140d7a8f37
commit
0869610372
5 files changed
+10
-3
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import { join, dirname } from 'path'
|
||||
import { join, dirname, resolve } from 'path'
|
||||
import { name, version, debug } from '../../../package.json'
|
||||
import { fileURLToPath } from 'url'
|
||||
|
||||
@@ -21,6 +21,10 @@ export default class Constants {
|
||||
|
||||
static IS_DEV_ENV = process.env.NODE_ENV === 'development'
|
||||
|
||||
static PUBLIC_PATH = Constants.IS_DEV_ENV
|
||||
? resolve(__dirname, '../../src/public')
|
||||
: resolve(__dirname, '..')
|
||||
|
||||
// To show devtools at startup. It requires IS_DEV_ENV=true.
|
||||
// Note: For debugging purpose, window won't be closed if click elsewhere, if devtools is open.
|
||||
static IS_DEVTOOLS = true
|
||||
|
||||
Reference in new issue
Block a user