Remove @emotion/babel-preset-css-prop and import { jsx } from @emotion/core directly instead so Rollup can preserve imports order when bundling (instead of @emotion/core automatically inserting itself as the first import).
17 lines
475 B
JavaScript
17 lines
475 B
JavaScript
import invariant from 'invariant';
|
|
|
|
import getEntryPoint from './getEntryPoint';
|
|
|
|
export default function getScripts(entryName, globalURLs) {
|
|
const entryPoint = getEntryPoint(entryName, 'iife');
|
|
|
|
invariant(entryPoint, 'Invalid entry name "%s"', entryName);
|
|
|
|
const globalScripts = entryPoint.globalImports.map(id => {
|
|
invariant(globalURLs[id], 'Missing global URL for id "%s"', id);
|
|
return globalURLs[id];
|
|
});
|
|
|
|
return globalScripts.concat(entryPoint.url);
|
|
}
|