Skip to content

Commit

Permalink
build: replace Webpack config with Vite config
Browse files Browse the repository at this point in the history
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
  • Loading branch information
ShGKme committed Aug 12, 2024
1 parent 1d7f498 commit 9f8de7b
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 284 deletions.
7 changes: 0 additions & 7 deletions babel.config.js

This file was deleted.

221 changes: 0 additions & 221 deletions build-js/WebpackSPDXPlugin.js

This file was deleted.

5 changes: 0 additions & 5 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ Vue.prototype.n = n
Vue.prototype.OC = OC
Vue.prototype.OCA = OCA

// eslint-disable-next-line
__webpack_nonce__ = btoa(OC.requestToken);
// eslint-disable-next-line
__webpack_public_path__ = OC.linkTo('notifications', 'js/');

export default new Vue({
el: '#notifications',
// eslint-disable-next-line vue/match-component-file-name
Expand Down
24 changes: 24 additions & 0 deletions vite.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/**
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

import { join, resolve } from 'node:path'
import { createAppConfig } from '@nextcloud/vite-config'

export default createAppConfig({
main: resolve(join('src', 'main.js')),
settings: resolve(join('src', 'settings.js')),
'admin-settings': resolve(join('src', 'adminSettings.js')),
}, {
emptyOutputDirectory: {
additionalDirectories: [
'css',
],
},
extractLicenseInformation: {
overwriteLicenses: {
'@nextcloud/axios': 'GPL-3.0-or-later',
},
},
})
51 changes: 0 additions & 51 deletions webpack.js

This file was deleted.

0 comments on commit 9f8de7b

Please sign in to comment.