chore(webpack): Move to shared code for entrypoints and use webpack serve public path
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
committed by
backportbot-nextcloud[bot]
parent
c30bf3c936
commit
24d4d86aa4
12
src/shared-init.js
Normal file
12
src/shared-init.js
Normal file
@@ -0,0 +1,12 @@
|
||||
import { generateFilePath } from '@nextcloud/router'
|
||||
|
||||
// eslint-disable-next-line
|
||||
__webpack_nonce__ = btoa(OC.requestToken)
|
||||
|
||||
if (!process.env.WEBPACK_SERVE) {
|
||||
// eslint-disable-next-line
|
||||
__webpack_public_path__ = generateFilePath('deck', '', 'js/')
|
||||
} else {
|
||||
// eslint-disable-next-line
|
||||
__webpack_public_path__ = 'http://127.0.0.1:3000/'
|
||||
}
|
||||
Reference in New Issue
Block a user