Skip to content

Commit

Permalink
[FIX] #42795 UI: fix rollup config for input fields bundle. (ILIAS-eL…
Browse files Browse the repository at this point in the history
…earning#8774)

* Fixes https://mantis.ilias.de/view.php?id=42795
* Changes bundle format from 'es' to 'iife'.
* Adds il global as external.
  • Loading branch information
thibsy committed Dec 20, 2024
1 parent e06b8e0 commit c5cb3e6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 10 additions & 3 deletions components/ILIAS/UI/resources/js/Input/Field/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,21 @@
*/

import terser from '@rollup/plugin-terser';
import copyright from '../../../../../../../scripts/Copyright-Checker/copyright';
import preserveCopyright from '../../../../../../../scripts/Copyright-Checker/preserveCopyright';
import copyright from '../../../../../../../scripts/Copyright-Checker/copyright.js';
import preserveCopyright from '../../../../../../../scripts/Copyright-Checker/preserveCopyright.js';

export default {
input: './src/input.factory.js',
external: [
'ilias',
],
output: {
file: './dist/input.factory.min.js',
format: 'es',
format: 'iife',
banner: copyright,
globals: {
ilias: 'il',
},
plugins: [
terser({
format: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
* other and are bundled into separate files.
*/

import il from 'ilias';
import TextareaFactory from './Textarea/textarea.factory';
import MarkdownFactory from './Markdown/markdown.factory';

var il = il || {};
il.UI = il.UI || {};
il.UI.Input = il.UI.Input || {};

Expand Down

0 comments on commit c5cb3e6

Please sign in to comment.