Skip to content

Commit 62ced0c

Browse files
authored
Merge pull request #819 from nextcloud/fix/webpack_public_path
fix(webpack): set `__webpack_public_path__`
2 parents 6bf4c16 + de0ba31 commit 62ced0c

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

cypress/support/commands.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,18 @@ import axios from '@nextcloud/axios'
1616
const url = Cypress.config('baseUrl').replace(/\/index.php\/?$/g, '')
1717
Cypress.env('baseUrl', url)
1818

19+
/**
20+
* Ignore ResizeObserver loop limit exceeded' exceptions from browser
21+
* See https://stackoverflow.com/q/49384120 for details
22+
*/
23+
const resizeObserverLoopErrRe = /^[^(ResizeObserver loop limit exceeded)]/
24+
Cypress.on('uncaught:exception', (err) => {
25+
/* returning false here prevents Cypress from failing the test */
26+
if (resizeObserverLoopErrRe.test(err.message)) {
27+
return false
28+
}
29+
})
30+
1931
/**
2032
* Login a user to Nextcloud and visit a given route
2133
*/

src/main.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,13 @@ import Collectives from './Collectives.vue'
2525
import router from './router.js'
2626
import store from './store/store.js'
2727
import { sync } from 'vuex-router-sync'
28+
import { generateFilePath } from '@nextcloud/router'
2829

2930
/** Global directives */
3031
import VTooltip from '@nextcloud/vue/dist/Directives/Tooltip.js'
3132

33+
__webpack_public_path__ = generateFilePath('collectives', '', 'js/') // eslint-disable-line
34+
3235
// Register global directives
3336
Vue.directive('Tooltip', VTooltip)
3437

0 commit comments

Comments
 (0)