Skip to content

Commit

Permalink
Merge pull request #10482 from nextcloud/revert/vite
Browse files Browse the repository at this point in the history
chore: welcome back webpack
  • Loading branch information
ChristophWurst authored Dec 12, 2024
2 parents 1309b9e + 2025394 commit 099e479
Show file tree
Hide file tree
Showing 38 changed files with 7,116 additions and 24,812 deletions.
File renamed without changes.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ tests/clover*.xml
node_modules/

/js
/css

# packaged app
build/artifacts
Expand Down
8 changes: 0 additions & 8 deletions babel.config.cjs

This file was deleted.

19 changes: 19 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
module.exports = {
plugins: [
'@babel/plugin-syntax-dynamic-import'
],
presets: [
[
'@babel/preset-env',
{
modules: process.env.NODE_ENV === 'testing' ? 'commonjs' : undefined,
useBuiltIns: process.env.NODE_ENV === 'testing' ? 'usage' : 'entry',
corejs: 3
}
]
]
};
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 1 addition & 3 deletions jest.config.cjs → jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ module.exports = {
require.resolve('jest-transform-stub'),
'^.+\\.jsx?$': require.resolve('babel-jest'),
},
// support the same @ -> src alias mapping in source code
moduleNameMapper: {
// support the same @ -> src alias mapping in source code
'^@/(.*)$': '<rootDir>/src/$1',
// trim "?raw" suffixes from svg imports
'(.*\\.svg)\\?raw$': '$1',
},
// serializer for snapshots
snapshotSerializers: [
Expand Down
2 changes: 1 addition & 1 deletion krankerl.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[package]
before_cmds = [
"composer install --no-dev -o",
"npm install",
"npm install --deps",
"npm run build",
"composer openapi"
]
4 changes: 2 additions & 2 deletions lib/Controller/MessagesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -582,8 +582,8 @@ public function getHtmlBody(int $id, bool $plain = false): Response {
$html,
$this->nonceManager->getNonce(),
$this->urlGenerator->getAbsoluteURL(
$this->urlGenerator->linkTo('mail', 'js/mail-htmlresponse.mjs')
),
$this->urlGenerator->linkTo('mail', 'js/htmlresponse.js')
)
);

// Harden the default security policy
Expand Down
2 changes: 1 addition & 1 deletion lib/Http/HtmlResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,6 @@ public function render(): string {
return $this->content;
}

return '<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><script nonce="' . $this->nonce . '" src="' . $this->scriptUrl . '" type="module"></script></head><body>' . $this->content . '<div data-iframe-height></div></body></html>';
return '<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><script nonce="' . $this->nonce . '" src="' . $this->scriptUrl . '"></script></head><body>' . $this->content . '<div data-iframe-height></div></body></html>';
}
}
Loading

0 comments on commit 099e479

Please sign in to comment.