Skip to content

Commit

Permalink
Format fix
Browse files Browse the repository at this point in the history
  • Loading branch information
okaycj committed Nov 6, 2024
1 parent ea79d98 commit e377357
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions rollup.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,22 @@ export function makeRollupConfig(iifeName) {
return jsPsychMakeRollupConfig(iifeName).map((config) => {
// We need to update the config from jsPysch
const output = // Move all outputs into an array
(Array.isArray(config.output) ? config.output : [config.output])
// Iife outputs need to have external packages as globals
.map((o) => {
return o.format === "iife"
? {
...o,
globals: {
...config.output.globals,
[packages.data.name]: packages.data.iife,
[packages.templates.name]: packages.templates.iife,
},
}
: o;
})
// Set source map to true for all outputs
.map((o) => ({ ...o, sourcemap: true }));
(Array.isArray(config.output) ? config.output : [config.output])
// Iife outputs need to have external packages as globals
.map((o) => {
return o.format === "iife"
? {
...o,
globals: {
...config.output.globals,
[packages.data.name]: packages.data.iife,
[packages.templates.name]: packages.templates.iife,
},
}
: o;
})
// Set source map to true for all outputs
.map((o) => ({ ...o, sourcemap: true }));

return {
...config,
Expand Down

0 comments on commit e377357

Please sign in to comment.