@hitachivantara/app-shell-vite-plugin 0.17.11 → 0.18.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/README.md +22 -24
  2. package/dist/automatic-utils.d.ts +25 -2
  3. package/dist/automatic-utils.d.ts.map +1 -1
  4. package/dist/automatic-utils.js +97 -67
  5. package/dist/automatic-utils.js.map +1 -1
  6. package/dist/config-utils.d.ts +4 -11
  7. package/dist/config-utils.d.ts.map +1 -1
  8. package/dist/config-utils.js +9 -50
  9. package/dist/config-utils.js.map +1 -1
  10. package/dist/esm-externals/emotion-react.production.min.js.map +1 -1
  11. package/dist/esm-externals/react-dom.production.min.js +2 -2
  12. package/dist/esm-externals/react-dom.production.min.js.map +1 -1
  13. package/dist/esm-externals/react-router-dom.production.min.js +18 -8
  14. package/dist/esm-externals/react-router-dom.production.min.js.map +1 -1
  15. package/dist/esm-externals/react.production.min.js.map +1 -1
  16. package/dist/index.d.ts +1 -0
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js.map +1 -1
  19. package/dist/virtual-entrypoints.js +2 -2
  20. package/dist/virtual-entrypoints.js.map +1 -1
  21. package/dist/vite-configuration-processor-plugin.d.ts +4 -1
  22. package/dist/vite-configuration-processor-plugin.d.ts.map +1 -1
  23. package/dist/vite-configuration-processor-plugin.js +44 -63
  24. package/dist/vite-configuration-processor-plugin.js.map +1 -1
  25. package/dist/vite-generate-base-plugin.d.ts +1 -1
  26. package/dist/vite-generate-base-plugin.js +3 -3
  27. package/dist/vite-generate-base-plugin.js.map +1 -1
  28. package/dist/vite-generate-bash-script-plugin.js +5 -5
  29. package/dist/vite-generate-bash-script-plugin.js.map +1 -1
  30. package/dist/vite-importmap-plugin.d.ts +1 -1
  31. package/dist/vite-importmap-plugin.d.ts.map +1 -1
  32. package/dist/vite-importmap-plugin.js +8 -8
  33. package/dist/vite-importmap-plugin.js.map +1 -1
  34. package/dist/vite-metadata-plugin.d.ts +1 -1
  35. package/dist/vite-metadata-plugin.js +2 -2
  36. package/dist/vite-metadata-plugin.js.map +1 -1
  37. package/dist/vite-plugin.d.ts +10 -4
  38. package/dist/vite-plugin.d.ts.map +1 -1
  39. package/dist/vite-plugin.js +11 -21
  40. package/dist/vite-plugin.js.map +1 -1
  41. package/dist/vite-watch-config-plugin.d.ts +1 -1
  42. package/dist/vite-watch-config-plugin.d.ts.map +1 -1
  43. package/dist/vite-watch-config-plugin.js +69 -3
  44. package/dist/vite-watch-config-plugin.js.map +1 -1
  45. package/package.json +8 -7
@@ -1 +1 @@
1
- {"version":3,"file":"react.production.min.js","sources":["../../../../node_modules/react/index.js","../../../../node_modules/react/cjs/react.production.min.js","../../src/export-externals/export-react.js"],"sourcesContent":["'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.production.min.js');\n} else {\n module.exports = require('./cjs/react.development.js');\n}\n","/**\n * @license React\n * react.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var l=Symbol.for(\"react.element\"),n=Symbol.for(\"react.portal\"),p=Symbol.for(\"react.fragment\"),q=Symbol.for(\"react.strict_mode\"),r=Symbol.for(\"react.profiler\"),t=Symbol.for(\"react.provider\"),u=Symbol.for(\"react.context\"),v=Symbol.for(\"react.forward_ref\"),w=Symbol.for(\"react.suspense\"),x=Symbol.for(\"react.memo\"),y=Symbol.for(\"react.lazy\"),z=Symbol.iterator;function A(a){if(null===a||\"object\"!==typeof a)return null;a=z&&a[z]||a[\"@@iterator\"];return\"function\"===typeof a?a:null}\nvar B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,D={};function E(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}E.prototype.isReactComponent={};\nE.prototype.setState=function(a,b){if(\"object\"!==typeof a&&\"function\"!==typeof a&&null!=a)throw Error(\"setState(...): takes an object of state variables to update or a function which returns an object of state variables.\");this.updater.enqueueSetState(this,a,b,\"setState\")};E.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,\"forceUpdate\")};function F(){}F.prototype=E.prototype;function G(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}var H=G.prototype=new F;\nH.constructor=G;C(H,E.prototype);H.isPureReactComponent=!0;var I=Array.isArray,J=Object.prototype.hasOwnProperty,K={current:null},L={key:!0,ref:!0,__self:!0,__source:!0};\nfunction M(a,b,e){var d,c={},k=null,h=null;if(null!=b)for(d in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(k=\"\"+b.key),b)J.call(b,d)&&!L.hasOwnProperty(d)&&(c[d]=b[d]);var g=arguments.length-2;if(1===g)c.children=e;else if(1<g){for(var f=Array(g),m=0;m<g;m++)f[m]=arguments[m+2];c.children=f}if(a&&a.defaultProps)for(d in g=a.defaultProps,g)void 0===c[d]&&(c[d]=g[d]);return{$$typeof:l,type:a,key:k,ref:h,props:c,_owner:K.current}}\nfunction N(a,b){return{$$typeof:l,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function O(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===l}function escape(a){var b={\"=\":\"=0\",\":\":\"=2\"};return\"$\"+a.replace(/[=:]/g,function(a){return b[a]})}var P=/\\/+/g;function Q(a,b){return\"object\"===typeof a&&null!==a&&null!=a.key?escape(\"\"+a.key):b.toString(36)}\nfunction R(a,b,e,d,c){var k=typeof a;if(\"undefined\"===k||\"boolean\"===k)a=null;var h=!1;if(null===a)h=!0;else switch(k){case \"string\":case \"number\":h=!0;break;case \"object\":switch(a.$$typeof){case l:case n:h=!0}}if(h)return h=a,c=c(h),a=\"\"===d?\".\"+Q(h,0):d,I(c)?(e=\"\",null!=a&&(e=a.replace(P,\"$&/\")+\"/\"),R(c,b,e,\"\",function(a){return a})):null!=c&&(O(c)&&(c=N(c,e+(!c.key||h&&h.key===c.key?\"\":(\"\"+c.key).replace(P,\"$&/\")+\"/\")+a)),b.push(c)),1;h=0;d=\"\"===d?\".\":d+\":\";if(I(a))for(var g=0;g<a.length;g++){k=\na[g];var f=d+Q(k,g);h+=R(k,b,e,f,c)}else if(f=A(a),\"function\"===typeof f)for(a=f.call(a),g=0;!(k=a.next()).done;)k=k.value,f=d+Q(k,g++),h+=R(k,b,e,f,c);else if(\"object\"===k)throw b=String(a),Error(\"Objects are not valid as a React child (found: \"+(\"[object Object]\"===b?\"object with keys {\"+Object.keys(a).join(\", \")+\"}\":b)+\"). If you meant to render a collection of children, use an array instead.\");return h}\nfunction S(a,b,e){if(null==a)return a;var d=[],c=0;R(a,d,\"\",\"\",function(a){return b.call(e,a,c++)});return d}function T(a){if(-1===a._status){var b=a._result;b=b();b.then(function(b){if(0===a._status||-1===a._status)a._status=1,a._result=b},function(b){if(0===a._status||-1===a._status)a._status=2,a._result=b});-1===a._status&&(a._status=0,a._result=b)}if(1===a._status)return a._result.default;throw a._result;}\nvar U={current:null},V={transition:null},W={ReactCurrentDispatcher:U,ReactCurrentBatchConfig:V,ReactCurrentOwner:K};exports.Children={map:S,forEach:function(a,b,e){S(a,function(){b.apply(this,arguments)},e)},count:function(a){var b=0;S(a,function(){b++});return b},toArray:function(a){return S(a,function(a){return a})||[]},only:function(a){if(!O(a))throw Error(\"React.Children.only expected to receive a single React element child.\");return a}};exports.Component=E;exports.Fragment=p;\nexports.Profiler=r;exports.PureComponent=G;exports.StrictMode=q;exports.Suspense=w;exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=W;\nexports.cloneElement=function(a,b,e){if(null===a||void 0===a)throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \"+a+\".\");var d=C({},a.props),c=a.key,k=a.ref,h=a._owner;if(null!=b){void 0!==b.ref&&(k=b.ref,h=K.current);void 0!==b.key&&(c=\"\"+b.key);if(a.type&&a.type.defaultProps)var g=a.type.defaultProps;for(f in b)J.call(b,f)&&!L.hasOwnProperty(f)&&(d[f]=void 0===b[f]&&void 0!==g?g[f]:b[f])}var f=arguments.length-2;if(1===f)d.children=e;else if(1<f){g=Array(f);\nfor(var m=0;m<f;m++)g[m]=arguments[m+2];d.children=g}return{$$typeof:l,type:a.type,key:c,ref:k,props:d,_owner:h}};exports.createContext=function(a){a={$$typeof:u,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};a.Provider={$$typeof:t,_context:a};return a.Consumer=a};exports.createElement=M;exports.createFactory=function(a){var b=M.bind(null,a);b.type=a;return b};exports.createRef=function(){return{current:null}};\nexports.forwardRef=function(a){return{$$typeof:v,render:a}};exports.isValidElement=O;exports.lazy=function(a){return{$$typeof:y,_payload:{_status:-1,_result:a},_init:T}};exports.memo=function(a,b){return{$$typeof:x,type:a,compare:void 0===b?null:b}};exports.startTransition=function(a){var b=V.transition;V.transition={};try{a()}finally{V.transition=b}};exports.unstable_act=function(){throw Error(\"act(...) is not supported in production builds of React.\");};\nexports.useCallback=function(a,b){return U.current.useCallback(a,b)};exports.useContext=function(a){return U.current.useContext(a)};exports.useDebugValue=function(){};exports.useDeferredValue=function(a){return U.current.useDeferredValue(a)};exports.useEffect=function(a,b){return U.current.useEffect(a,b)};exports.useId=function(){return U.current.useId()};exports.useImperativeHandle=function(a,b,e){return U.current.useImperativeHandle(a,b,e)};\nexports.useInsertionEffect=function(a,b){return U.current.useInsertionEffect(a,b)};exports.useLayoutEffect=function(a,b){return U.current.useLayoutEffect(a,b)};exports.useMemo=function(a,b){return U.current.useMemo(a,b)};exports.useReducer=function(a,b,e){return U.current.useReducer(a,b,e)};exports.useRef=function(a){return U.current.useRef(a)};exports.useState=function(a){return U.current.useState(a)};exports.useSyncExternalStore=function(a,b,e){return U.current.useSyncExternalStore(a,b,e)};\nexports.useTransition=function(){return U.current.useTransition()};exports.version=\"18.2.0\";\n","import React from \"react\";\n\nexport default React;\n/* eslint no-underscore-dangle: \"off\" */\nexport const __esmModule = true;\nexport const {\n Fragment,\n StrictMode,\n Profiler,\n Suspense,\n Children,\n Component,\n PureComponent,\n cloneElement,\n createContext,\n createElement,\n createFactory,\n createRef,\n forwardRef,\n isValidElement,\n lazy,\n memo,\n startTransition,\n useCallback,\n useContext,\n useDebugValue,\n useDeferredValue,\n useEffect,\n useId,\n useImperativeHandle,\n useInsertionEffect,\n useLayoutEffect,\n useMemo,\n useReducer,\n useRef,\n useState,\n useSyncExternalStore,\n useTransition,\n version\n} = React;\n"],"names":["reactModule","exports","l","Symbol","for","n","p","q","r","t","u","v","w","x","y","z","iterator","B","isMounted","enqueueForceUpdate","enqueueReplaceState","enqueueSetState","C","Object","assign","D","E","a","b","e","this","props","context","refs","updater","F","G","prototype","isReactComponent","setState","Error","forceUpdate","H","constructor","isPureReactComponent","I","Array","isArray","J","hasOwnProperty","K","current","L","key","ref","__self","__source","M","d","c","k","h","call","g","arguments","length","children","f","m","defaultProps","$$typeof","type","_owner","O","P","Q","replace","escape","toString","R","N","push","A","next","done","value","String","keys","join","S","T","_status","_result","then","default","U","V","transition","W","ReactCurrentDispatcher","ReactCurrentBatchConfig","ReactCurrentOwner","react_production_min","Children","map","forEach","apply","count","toArray","only","Component","Fragment","Profiler","StrictMode","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","cloneElement","createContext","_currentValue","_currentValue2","_threadCount","Provider","Consumer","_defaultValue","_globalName","_context","createElement","bind","createRef","forwardRef","render","isValidElement","lazy","_payload","_init","memo","compare","startTransition","unstable_act","useCallback","useContext","useDebugValue","useDeferredValue","useEffect","useId","useImperativeHandle","useInsertionEffect","useLayoutEffect","useMemo","useReducer","useRef","useState","useSyncExternalStore","useTransition","version","require$$0","__esmModule","Suspense","PureComponent","createFactory","React"],"mappings":";8HAGEA,EAAAC,qCCMW,IAAIC,EAAEC,OAAOC,IAAI,iBAAiBC,EAAEF,OAAOC,IAAI,gBAAgBE,EAAEH,OAAOC,IAAI,kBAAkBG,EAAE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AE5C,QAAQmG,SAAS3H,EAAE,EAAE2E,EAA4BiD,qBAAC,SAAS5H,EAAEC,EAAEC,GAAG,OAAOkE,EAAE5C,QAAQoG,qBAAqB5H,EAAEC,EAAEC,EAAE,EAC/eyE,EAAAkD,cAAsB,WAAW,OAAOzD,EAAE5C,QAAQqG,eAAe,EAAElD,EAAAmD,QAAgB,WDtBhEC,sBECP,MAACC,GAAc,GACd5C,SACXA,EAAQE,WACRA,EAAUD,SACVA,EAAQ4C,SACRA,EAAQrD,SACRA,EAAQO,UACRA,EAAS+C,cACTA,EAAa1C,aACbA,EAAYC,cACZA,EAAaS,cACbA,EAAaiC,cACbA,EAAa/B,UACbA,EAASC,WACTA,EAAUE,eACVA,EAAcC,KACdA,EAAIG,KACJA,EAAIE,gBACJA,EAAeE,YACfA,EAAWC,WACXA,EAAUC,cACVA,EAAaC,iBACbA,EAAgBC,UAChBA,EAASC,MACTA,EAAKC,oBACLA,EAAmBC,mBACnBA,EAAkBC,gBAClBA,EAAeC,QACfA,EAAOC,WACPA,EAAUC,OACVA,EAAMC,SACNA,EAAQC,qBACRA,EAAoBC,cACpBA,EAAaC,QACbA,GACEM","x_google_ignoreList":[0,1]}
1
+ {"version":3,"file":"react.production.min.js","sources":["../../../../node_modules/react/index.js","../../../../node_modules/react/cjs/react.production.min.js","../../src/export-externals/export-react.js"],"sourcesContent":["'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.production.min.js');\n} else {\n module.exports = require('./cjs/react.development.js');\n}\n","/**\n * @license React\n * react.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var l=Symbol.for(\"react.element\"),n=Symbol.for(\"react.portal\"),p=Symbol.for(\"react.fragment\"),q=Symbol.for(\"react.strict_mode\"),r=Symbol.for(\"react.profiler\"),t=Symbol.for(\"react.provider\"),u=Symbol.for(\"react.context\"),v=Symbol.for(\"react.forward_ref\"),w=Symbol.for(\"react.suspense\"),x=Symbol.for(\"react.memo\"),y=Symbol.for(\"react.lazy\"),z=Symbol.iterator;function A(a){if(null===a||\"object\"!==typeof a)return null;a=z&&a[z]||a[\"@@iterator\"];return\"function\"===typeof a?a:null}\nvar B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,D={};function E(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}E.prototype.isReactComponent={};\nE.prototype.setState=function(a,b){if(\"object\"!==typeof a&&\"function\"!==typeof a&&null!=a)throw Error(\"setState(...): takes an object of state variables to update or a function which returns an object of state variables.\");this.updater.enqueueSetState(this,a,b,\"setState\")};E.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,\"forceUpdate\")};function F(){}F.prototype=E.prototype;function G(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}var H=G.prototype=new F;\nH.constructor=G;C(H,E.prototype);H.isPureReactComponent=!0;var I=Array.isArray,J=Object.prototype.hasOwnProperty,K={current:null},L={key:!0,ref:!0,__self:!0,__source:!0};\nfunction M(a,b,e){var d,c={},k=null,h=null;if(null!=b)for(d in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(k=\"\"+b.key),b)J.call(b,d)&&!L.hasOwnProperty(d)&&(c[d]=b[d]);var g=arguments.length-2;if(1===g)c.children=e;else if(1<g){for(var f=Array(g),m=0;m<g;m++)f[m]=arguments[m+2];c.children=f}if(a&&a.defaultProps)for(d in g=a.defaultProps,g)void 0===c[d]&&(c[d]=g[d]);return{$$typeof:l,type:a,key:k,ref:h,props:c,_owner:K.current}}\nfunction N(a,b){return{$$typeof:l,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function O(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===l}function escape(a){var b={\"=\":\"=0\",\":\":\"=2\"};return\"$\"+a.replace(/[=:]/g,function(a){return b[a]})}var P=/\\/+/g;function Q(a,b){return\"object\"===typeof a&&null!==a&&null!=a.key?escape(\"\"+a.key):b.toString(36)}\nfunction R(a,b,e,d,c){var k=typeof a;if(\"undefined\"===k||\"boolean\"===k)a=null;var h=!1;if(null===a)h=!0;else switch(k){case \"string\":case \"number\":h=!0;break;case \"object\":switch(a.$$typeof){case l:case n:h=!0}}if(h)return h=a,c=c(h),a=\"\"===d?\".\"+Q(h,0):d,I(c)?(e=\"\",null!=a&&(e=a.replace(P,\"$&/\")+\"/\"),R(c,b,e,\"\",function(a){return a})):null!=c&&(O(c)&&(c=N(c,e+(!c.key||h&&h.key===c.key?\"\":(\"\"+c.key).replace(P,\"$&/\")+\"/\")+a)),b.push(c)),1;h=0;d=\"\"===d?\".\":d+\":\";if(I(a))for(var g=0;g<a.length;g++){k=\na[g];var f=d+Q(k,g);h+=R(k,b,e,f,c)}else if(f=A(a),\"function\"===typeof f)for(a=f.call(a),g=0;!(k=a.next()).done;)k=k.value,f=d+Q(k,g++),h+=R(k,b,e,f,c);else if(\"object\"===k)throw b=String(a),Error(\"Objects are not valid as a React child (found: \"+(\"[object Object]\"===b?\"object with keys {\"+Object.keys(a).join(\", \")+\"}\":b)+\"). If you meant to render a collection of children, use an array instead.\");return h}\nfunction S(a,b,e){if(null==a)return a;var d=[],c=0;R(a,d,\"\",\"\",function(a){return b.call(e,a,c++)});return d}function T(a){if(-1===a._status){var b=a._result;b=b();b.then(function(b){if(0===a._status||-1===a._status)a._status=1,a._result=b},function(b){if(0===a._status||-1===a._status)a._status=2,a._result=b});-1===a._status&&(a._status=0,a._result=b)}if(1===a._status)return a._result.default;throw a._result;}\nvar U={current:null},V={transition:null},W={ReactCurrentDispatcher:U,ReactCurrentBatchConfig:V,ReactCurrentOwner:K};exports.Children={map:S,forEach:function(a,b,e){S(a,function(){b.apply(this,arguments)},e)},count:function(a){var b=0;S(a,function(){b++});return b},toArray:function(a){return S(a,function(a){return a})||[]},only:function(a){if(!O(a))throw Error(\"React.Children.only expected to receive a single React element child.\");return a}};exports.Component=E;exports.Fragment=p;\nexports.Profiler=r;exports.PureComponent=G;exports.StrictMode=q;exports.Suspense=w;exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=W;\nexports.cloneElement=function(a,b,e){if(null===a||void 0===a)throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \"+a+\".\");var d=C({},a.props),c=a.key,k=a.ref,h=a._owner;if(null!=b){void 0!==b.ref&&(k=b.ref,h=K.current);void 0!==b.key&&(c=\"\"+b.key);if(a.type&&a.type.defaultProps)var g=a.type.defaultProps;for(f in b)J.call(b,f)&&!L.hasOwnProperty(f)&&(d[f]=void 0===b[f]&&void 0!==g?g[f]:b[f])}var f=arguments.length-2;if(1===f)d.children=e;else if(1<f){g=Array(f);\nfor(var m=0;m<f;m++)g[m]=arguments[m+2];d.children=g}return{$$typeof:l,type:a.type,key:c,ref:k,props:d,_owner:h}};exports.createContext=function(a){a={$$typeof:u,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};a.Provider={$$typeof:t,_context:a};return a.Consumer=a};exports.createElement=M;exports.createFactory=function(a){var b=M.bind(null,a);b.type=a;return b};exports.createRef=function(){return{current:null}};\nexports.forwardRef=function(a){return{$$typeof:v,render:a}};exports.isValidElement=O;exports.lazy=function(a){return{$$typeof:y,_payload:{_status:-1,_result:a},_init:T}};exports.memo=function(a,b){return{$$typeof:x,type:a,compare:void 0===b?null:b}};exports.startTransition=function(a){var b=V.transition;V.transition={};try{a()}finally{V.transition=b}};exports.unstable_act=function(){throw Error(\"act(...) is not supported in production builds of React.\");};\nexports.useCallback=function(a,b){return U.current.useCallback(a,b)};exports.useContext=function(a){return U.current.useContext(a)};exports.useDebugValue=function(){};exports.useDeferredValue=function(a){return U.current.useDeferredValue(a)};exports.useEffect=function(a,b){return U.current.useEffect(a,b)};exports.useId=function(){return U.current.useId()};exports.useImperativeHandle=function(a,b,e){return U.current.useImperativeHandle(a,b,e)};\nexports.useInsertionEffect=function(a,b){return U.current.useInsertionEffect(a,b)};exports.useLayoutEffect=function(a,b){return U.current.useLayoutEffect(a,b)};exports.useMemo=function(a,b){return U.current.useMemo(a,b)};exports.useReducer=function(a,b,e){return U.current.useReducer(a,b,e)};exports.useRef=function(a){return U.current.useRef(a)};exports.useState=function(a){return U.current.useState(a)};exports.useSyncExternalStore=function(a,b,e){return U.current.useSyncExternalStore(a,b,e)};\nexports.useTransition=function(){return U.current.useTransition()};exports.version=\"18.2.0\";\n","import React from \"react\";\n\nexport default React;\n/* eslint no-underscore-dangle: \"off\" */\nexport const __esmModule = true;\nexport const {\n Fragment,\n StrictMode,\n Profiler,\n Suspense,\n Children,\n Component,\n PureComponent,\n cloneElement,\n createContext,\n createElement,\n createFactory,\n createRef,\n forwardRef,\n isValidElement,\n lazy,\n memo,\n startTransition,\n useCallback,\n useContext,\n useDebugValue,\n useDeferredValue,\n useEffect,\n useId,\n useImperativeHandle,\n useInsertionEffect,\n useLayoutEffect,\n useMemo,\n useReducer,\n useRef,\n useState,\n useSyncExternalStore,\n useTransition,\n version\n} = React;\n"],"names":["reactModule","exports","l","Symbol","for","n","p","q","r","t","u","v","w","x","y","z","iterator","B","isMounted","enqueueForceUpdate","enqueueReplaceState","enqueueSetState","C","Object","assign","D","E","a","b","e","this","props","context","refs","updater","F","G","prototype","isReactComponent","setState","Error","forceUpdate","H","constructor","isPureReactComponent","I","Array","isArray","J","hasOwnProperty","K","current","L","key","ref","__self","__source","M","d","c","k","h","call","g","arguments","length","children","f","m","defaultProps","$$typeof","type","_owner","O","P","Q","replace","escape","toString","R","N","push","A","next","done","value","String","keys","join","S","T","_status","_result","then","default","U","V","transition","W","ReactCurrentDispatcher","ReactCurrentBatchConfig","ReactCurrentOwner","react_production_min","Children","map","forEach","apply","count","toArray","only","Component","Fragment","Profiler","StrictMode","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","cloneElement","createContext","_currentValue","_currentValue2","_threadCount","Provider","Consumer","_defaultValue","_globalName","_context","createElement","bind","createRef","forwardRef","render","isValidElement","lazy","_payload","_init","memo","compare","startTransition","unstable_act","useCallback","useContext","useDebugValue","useDeferredValue","useEffect","useId","useImperativeHandle","useInsertionEffect","useLayoutEffect","useMemo","useReducer","useRef","useState","useSyncExternalStore","useTransition","version","require$$1","__esmModule","Suspense","PureComponent","createFactory","React"],"mappings":";8HAGEA,EAAAC,qCCMW,IAAIC,EAAEC,OAAOC,IAAI,iBAAiBC,EAAEF,OAAOC,IAAI,gBAAgBE,EAAEH,OAAOC,IAAI,kBAAkBG,EAAEJ,OAAOC,IAAI,qBAAqBI,EAAEL,OAAOC,IAAI,kBAAkBK,EAAEN,OAAOC,IAAI,kBAAkBM,EAAEP,OAAOC,IAAI,iBAAiBO,EAAER,OAAOC,IAAI,qBAAqBQ,EAAET,OAAOC,IAAI,kBAAkBS,EAAEV,OAAOC,IAAI,cAAcU,EAAEX,OAAOC,IAAI,cAAcW,EAAEZ,OAAOa,SACrWC,EAAE,CAACC,UAAU,WAAW,OAAM,CAAE,EAAEC,mBAAmB,aAAaC,oBAAoB,aAAaC,gBAAgB,WAAU,GAAIC,EAAEC,OAAOC,OAAOC,EAAE,CAAA,EAAG,SAASC,EAAEC,EAAEC,EAAEC,GAAGC,KAAKC,MAAMJ,EAAEG,KAAKE,QAAQJ,EAAEE,KAAKG,KAAKR,EAAEK,KAAKI,QAAQL,GAAGZ,CAAC,CACwI,SAASkB,IAAG,CAA0B,SAASC,EAAET,EAAEC,EAAEC,GAAGC,KAAKC,MAAMJ,EAAEG,KAAKE,QAAQJ,EAAEE,KAAKG,KAAKR,EAAEK,KAAKI,QAAQL,GAAGZ,CAAC,CADxPS,EAAEW,UAAUC,iBAAiB,GACnQZ,EAAEW,UAAUE,SAAS,SAASZ,EAAEC,GAAG,GAAG,iBAAkBD,GAAG,mBAAoBA,GAAG,MAAMA,EAAE,MAAMa,MAAM,yHAAyHV,KAAKI,QAAQb,gBAAgBS,KAAKH,E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AEC,GAAG,OAAOmE,EAAE5C,QAAQ+F,gBAAgBvH,EAAEC,EAAE,EAAE0E,UAAgB,SAAS3E,EAAEC,GAAG,OAAOmE,EAAE5C,QAAQgG,QAAQxH,EAAEC,EAAE,EAAE0E,EAAkB8C,WAAC,SAASzH,EAAEC,EAAEC,GAAG,OAAOkE,EAAE5C,QAAQiG,WAAWzH,EAAEC,EAAEC,EAAE,EAAEyE,SAAe,SAAS3E,GAAG,OAAOoE,EAAE5C,QAAQkG,OAAO1H,EAAE,EAAE2E,EAAgBgD,SAAC,SAAS3H,GAAG,OAAOoE,EAAE5C,QAAQmG,SAAS3H,EAAE,EAAE2E,EAA4BiD,qBAAC,SAAS5H,EAAEC,EAAEC,GAAG,OAAOkE,EAAE5C,QAAQoG,qBAAqB5H,EAAEC,EAAEC,EAAE,EAC/eyE,EAAAkD,cAAsB,WAAW,OAAOzD,EAAE5C,QAAQqG,eAAe,EAAElD,EAAAmD,QAAgB,WDtBhEC,sBECP,MAACC,GAAc,GACd5C,SACXA,EAAQE,WACRA,EAAUD,SACVA,EAAQ4C,SACRA,EAAQrD,SACRA,EAAQO,UACRA,EAAS+C,cACTA,EAAa1C,aACbA,EAAYC,cACZA,EAAaS,cACbA,EAAaiC,cACbA,EAAa/B,UACbA,EAASC,WACTA,EAAUE,eACVA,EAAcC,KACdA,EAAIG,KACJA,EAAIE,gBACJA,EAAeE,YACfA,EAAWC,WACXA,EAAUC,cACVA,EAAaC,iBACbA,EAAgBC,UAChBA,EAASC,MACTA,EAAKC,oBACLA,EAAmBC,mBACnBA,EAAkBC,gBAClBA,EAAeC,QACfA,EAAOC,WACPA,EAAUC,OACVA,EAAMC,SACNA,EAAQC,qBACRA,EAAoBC,cACpBA,EAAaC,QACbA,GACEM","x_google_ignoreList":[0,1]}
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export { default as HvAppShellVitePlugin } from "./vite-plugin.js";
2
2
  export * from "./vite-plugin.js";
3
+ export type { HvAppShellConfig, HvAppShellIcon, HvAppShellLogo, HvAppShellMenuConfig, HvAppShellMainPanelConfig, HvAppShellViewsConfig } from "@hitachivantara/app-shell-shared";
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACnE,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACnE,cAAc,kBAAkB,CAAC;AAGjC,YAAY,EACV,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,yBAAyB,EACzB,qBAAqB,EACtB,MAAM,kCAAkC,CAAC"}
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACnE,cAAc,kBAAkB,CAAC","sourcesContent":["export { default as HvAppShellVitePlugin } from \"./vite-plugin.js\";\nexport * from \"./vite-plugin.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACnE,cAAc,kBAAkB,CAAC","sourcesContent":["export { default as HvAppShellVitePlugin } from \"./vite-plugin.js\";\nexport * from \"./vite-plugin.js\";\n\n// reexport types from shared package\nexport type {\n HvAppShellConfig,\n HvAppShellIcon,\n HvAppShellLogo,\n HvAppShellMenuConfig,\n HvAppShellMainPanelConfig,\n HvAppShellViewsConfig\n} from \"@hitachivantara/app-shell-shared\";\n"]}
@@ -13,7 +13,7 @@ root.render(React.createElement(
13
13
  ));`,
14
14
  "virtual:App.tsx": inlineConfig
15
15
  ? `import React from "react";
16
- import { HvAppShell } from "@hitachivantara/app-shell";
16
+ import HvAppShell from "@hitachivantara/app-shell-ui";
17
17
 
18
18
  const App = () => {
19
19
  return React.createElement(HvAppShell, {
@@ -23,7 +23,7 @@ const App = () => {
23
23
 
24
24
  export default App;`
25
25
  : `import React from "react";
26
- import { HvAppShell } from "@hitachivantara/app-shell";
26
+ import HvAppShell from "@hitachivantara/app-shell-ui";
27
27
 
28
28
  const App = () => {
29
29
  return React.createElement(HvAppShell, {
@@ -1 +1 @@
1
- {"version":3,"file":"virtual-entrypoints.js","sourceRoot":"","sources":["../src/virtual-entrypoints.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,YAAqB;IACjE,OAAO;QACL,mBAAmB,EAAE;;;;;;;;;;IAUrB;QAEA,iBAAiB,EAAE,YAAY;YAC7B,CAAC,CAAC;;;;;;;;;oBASY;YACd,CAAC,CAAC;;;;;;;;;oBASY;KACjB,CAAC;AACJ,CAAC","sourcesContent":["export default function getVirtualEntrypoints(inlineConfig: boolean) {\n return {\n \"/virtual/main.tsx\": `import React, { Suspense } from \"react\";\nimport ReactDOM from \"react-dom/client\";\nimport App from \"virtual:App.tsx\";\n\nconst root = ReactDOM.createRoot(document.getElementById(\"hv-root\"));\n\nroot.render(React.createElement(\n Suspense,\n { fallback: true },\n React.createElement(App, null)\n));`,\n\n \"virtual:App.tsx\": inlineConfig\n ? `import React from \"react\";\nimport { HvAppShell } from \"@hitachivantara/app-shell\";\n\nconst App = () => {\n return React.createElement(HvAppShell, {\n config: globalThis.__appshell_config__\n });\n};\n\nexport default App;`\n : `import React from \"react\";\nimport { HvAppShell } from \"@hitachivantara/app-shell\";\n\nconst App = () => {\n return React.createElement(HvAppShell, {\n configUrl: document.baseURI + \"app-shell.config.json\"\n });\n};\n\nexport default App;`\n };\n}\n"]}
1
+ {"version":3,"file":"virtual-entrypoints.js","sourceRoot":"","sources":["../src/virtual-entrypoints.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,YAAqB;IACjE,OAAO;QACL,mBAAmB,EAAE;;;;;;;;;;IAUrB;QAEA,iBAAiB,EAAE,YAAY;YAC7B,CAAC,CAAC;;;;;;;;;oBASY;YACd,CAAC,CAAC;;;;;;;;;oBASY;KACjB,CAAC;AACJ,CAAC","sourcesContent":["export default function getVirtualEntrypoints(inlineConfig: boolean) {\n return {\n \"/virtual/main.tsx\": `import React, { Suspense } from \"react\";\nimport ReactDOM from \"react-dom/client\";\nimport App from \"virtual:App.tsx\";\n\nconst root = ReactDOM.createRoot(document.getElementById(\"hv-root\"));\n\nroot.render(React.createElement(\n Suspense,\n { fallback: true },\n React.createElement(App, null)\n));`,\n\n \"virtual:App.tsx\": inlineConfig\n ? `import React from \"react\";\nimport HvAppShell from \"@hitachivantara/app-shell-ui\";\n\nconst App = () => {\n return React.createElement(HvAppShell, {\n config: globalThis.__appshell_config__\n });\n};\n\nexport default App;`\n : `import React from \"react\";\nimport HvAppShell from \"@hitachivantara/app-shell-ui\";\n\nconst App = () => {\n return React.createElement(HvAppShell, {\n configUrl: document.baseURI + \"app-shell.config.json\"\n });\n};\n\nexport default App;`\n };\n}\n"]}
@@ -9,6 +9,9 @@ import type { HvAppShellConfig } from "@hitachivantara/app-shell-shared";
9
9
  * @param appShellConfig The original App Shell configuration json.
10
10
  * @param selfAppName The name of the application bundle being built.
11
11
  * @param buildEntryPoint If true, the index.html entry point will be added to the bundle.
12
+ * @param inlineConfig flag to control if config is included at index.html
13
+ * @param generateEmptyShell flag to control if we are creating an empty AppShell instance
14
+ * @param modules the set of modules to be created by the rollup
12
15
  */
13
- export default function processConfiguration(root: string, appShellConfig: HvAppShellConfig, selfAppName: string, buildEntryPoint: boolean, inlineConfig: boolean, generateEmptyShell: boolean): PluginOption;
16
+ export default function processConfiguration(root: string, appShellConfig: HvAppShellConfig, selfAppName: string, buildEntryPoint: boolean, inlineConfig: boolean, generateEmptyShell: boolean, modules?: string[]): PluginOption;
14
17
  //# sourceMappingURL=vite-configuration-processor-plugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"vite-configuration-processor-plugin.d.ts","sourceRoot":"","sources":["../src/vite-configuration-processor-plugin.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAc,MAAM,MAAM,CAAC;AAGrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AASzE;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAC1C,IAAI,EAAE,MAAM,EACZ,cAAc,EAAE,gBAAgB,EAChC,WAAW,EAAE,MAAM,EACnB,eAAe,EAAE,OAAO,EACxB,YAAY,EAAE,OAAO,EACrB,kBAAkB,EAAE,OAAO,GAC1B,YAAY,CA4Kd"}
1
+ {"version":3,"file":"vite-configuration-processor-plugin.d.ts","sourceRoot":"","sources":["../src/vite-configuration-processor-plugin.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAc,MAAM,MAAM,CAAC;AAGrD,OAAO,KAAK,EACV,gBAAgB,EAIjB,MAAM,kCAAkC,CAAC;AAmC1C;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAC1C,IAAI,EAAE,MAAM,EACZ,cAAc,EAAE,gBAAgB,EAChC,WAAW,EAAE,MAAM,EACnB,eAAe,EAAE,OAAO,EACxB,YAAY,EAAE,OAAO,EACrB,kBAAkB,EAAE,OAAO,EAC3B,OAAO,GAAE,MAAM,EAAO,GACrB,YAAY,CAwId"}
@@ -1,11 +1,26 @@
1
1
  import fs from "fs";
2
2
  import path from "path";
3
- import { getAppModules, getMainApp, getPublicPath } from "./config-utils.js";
3
+ import { getAppModules, getPublicPath } from "./config-utils.js";
4
4
  var ViteCommand;
5
5
  (function (ViteCommand) {
6
6
  ViteCommand["BUILD"] = "build";
7
7
  ViteCommand["SERVE"] = "serve";
8
8
  })(ViteCommand || (ViteCommand = {}));
9
+ function startsWithSelf(value) {
10
+ return value.startsWith("@self/");
11
+ }
12
+ function replaceSelf(value) {
13
+ return value.replace(/^@self\//, "");
14
+ }
15
+ function replaceReferencesToSelf(bundles, selfAppName) {
16
+ return bundles.map(bundleDefinition => {
17
+ if (startsWithSelf(bundleDefinition.bundle)) {
18
+ const bundleName = replaceSelf(bundleDefinition.bundle);
19
+ return { ...bundleDefinition, bundle: `${selfAppName}/${bundleName}` };
20
+ }
21
+ return bundleDefinition;
22
+ });
23
+ }
9
24
  /**
10
25
  * Process configuration, executing several tasks:
11
26
  * - Create rollup configuration to support module creation
@@ -15,9 +30,11 @@ var ViteCommand;
15
30
  * @param appShellConfig The original App Shell configuration json.
16
31
  * @param selfAppName The name of the application bundle being built.
17
32
  * @param buildEntryPoint If true, the index.html entry point will be added to the bundle.
33
+ * @param inlineConfig flag to control if config is included at index.html
34
+ * @param generateEmptyShell flag to control if we are creating an empty AppShell instance
35
+ * @param modules the set of modules to be created by the rollup
18
36
  */
19
- export default function processConfiguration(root, appShellConfig, selfAppName, buildEntryPoint, inlineConfig, generateEmptyShell) {
20
- const selfApp = getMainApp(appShellConfig);
37
+ export default function processConfiguration(root, appShellConfig, selfAppName, buildEntryPoint, inlineConfig, generateEmptyShell, modules = []) {
21
38
  let finalAppShellConfig;
22
39
  return {
23
40
  name: "vite-plugin-appShell-configuration-processor",
@@ -26,7 +43,7 @@ export default function processConfiguration(root, appShellConfig, selfAppName,
26
43
  const publicPath = getPublicPath(appShellConfig);
27
44
  let appModules = {};
28
45
  if (!generateEmptyShell) {
29
- appModules = getAppModules(projectRoot, appShellConfig, selfAppName);
46
+ appModules = getAppModules(projectRoot, modules);
30
47
  console.info("Modules exported by the application bundle:", appModules);
31
48
  }
32
49
  return {
@@ -54,10 +71,9 @@ export default function processConfiguration(root, appShellConfig, selfAppName,
54
71
  * It will be used to create a new configuration with:
55
72
  * - bundles replace with the final location (e.g. -> "bundle": "src/pages/Main" transformed to "bundle": "pages/Main.js",
56
73
  * @param options build options
57
- * @param bundle bundles information
58
74
  */
59
- async generateBundle(options, bundle) {
60
- if (generateEmptyShell) {
75
+ async generateBundle(options) {
76
+ if (generateEmptyShell || !buildEntryPoint) {
61
77
  return;
62
78
  }
63
79
  // obtain the directory (dist) where the new config file will be placed
@@ -75,70 +91,35 @@ export default function processConfiguration(root, appShellConfig, selfAppName,
75
91
  if (!fs.existsSync(targetDir)) {
76
92
  fs.mkdirSync(targetDir, { recursive: true });
77
93
  }
78
- /**
79
- * Creating a map with each chunk and the final name. Only the bundles with type=chunk are important
80
- * Filename do not include the src path at the value
81
- */
82
- const chunks = {};
83
- Object.keys(bundle).forEach(key => {
84
- const chunk = bundle[key];
85
- if (chunk.type === "chunk") {
86
- const outputChunk = chunk;
87
- if (outputChunk.isEntry) {
88
- const { fileName } = outputChunk;
89
- const { name } = outputChunk;
90
- chunks[name] = fileName;
94
+ // theming structure does not rely on having the 'bundle' prop
95
+ const { theming } = appShellConfig;
96
+ if (theming != null) {
97
+ theming.themes = theming.themes?.map(theme => {
98
+ if (startsWithSelf(theme)) {
99
+ const bundleName = replaceSelf(theme);
100
+ return `${selfAppName}/${bundleName}`;
91
101
  }
92
- }
93
- });
94
- if (selfApp) {
95
- selfApp.views = selfApp.views?.map(view => {
96
- const bundleName = view.bundle
97
- .replace(/^src\//, "")
98
- .replaceAll(/\$/g, "_");
99
- return {
100
- ...view,
101
- bundle: chunks[bundleName]
102
- };
103
- });
104
- selfApp.modules = selfApp.modules?.map(module => {
105
- const bundleName = module.bundle.replace(/^src\//, "");
106
- return {
107
- ...module,
108
- bundle: chunks[bundleName]
109
- };
102
+ return theme;
110
103
  });
111
- // replace references to @self with the name of this application bundle
112
- selfApp.id = selfAppName;
113
- // also replace implicit references to selfApp in other parts of the configuration
114
- const { theming } = appShellConfig;
115
- if (theming != null) {
116
- theming.themes = theming.themes?.map(theme => {
117
- if (theme.startsWith("@self/") ||
118
- theme.startsWith(selfAppName) ||
119
- theme.startsWith("/src/")) {
120
- const bundleName = theme
121
- .replace(/^@self\//, "")
122
- .replace(new RegExp(`^${selfAppName}/`), "")
123
- .replace(/^(\/?)src\//, "");
124
- return `${selfAppName}/${chunks[bundleName]}`;
125
- }
126
- return theme;
127
- });
128
- }
129
104
  }
130
- finalAppShellConfig = buildEntryPoint
131
- ? { ...appShellConfig }
132
- : {
133
- name: appShellConfig.name,
134
- apps: selfApp != null ? [selfApp] : undefined
135
- };
105
+ finalAppShellConfig = { ...appShellConfig };
106
+ finalAppShellConfig.apps = undefined;
107
+ // also replace implicit references to selfApp in other parts of the configuration
108
+ if (finalAppShellConfig.providers != null) {
109
+ finalAppShellConfig.providers = replaceReferencesToSelf(finalAppShellConfig.providers, selfAppName);
110
+ }
111
+ if (finalAppShellConfig.mainPanel?.views != null) {
112
+ finalAppShellConfig.mainPanel.views = replaceReferencesToSelf(finalAppShellConfig.mainPanel.views, selfAppName);
113
+ }
114
+ if (finalAppShellConfig.header?.actions != null) {
115
+ finalAppShellConfig.header.actions = replaceReferencesToSelf(finalAppShellConfig.header?.actions, selfAppName);
116
+ }
136
117
  if (!inlineConfig) {
137
118
  fs.writeFileSync(path.resolve(targetDir, "app-shell.config.json"), JSON.stringify(finalAppShellConfig));
138
119
  }
139
120
  },
140
121
  transformIndexHtml: {
141
- transform: html => {
122
+ handler: html => {
142
123
  if (!inlineConfig) {
143
124
  return undefined;
144
125
  }
@@ -1 +1 @@
1
- {"version":3,"file":"vite-configuration-processor-plugin.js","sourceRoot":"","sources":["../src/vite-configuration-processor-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAOxB,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAE7E,IAAK,WAGJ;AAHD,WAAK,WAAW;IACd,8BAA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K,CAAC;oBACf,CAAC,CAAC,CAAC;iBACJ;aACF;YAED,mBAAmB,GAAG,eAAe;gBACnC,CAAC,CAAC,EAAE,GAAG,cAAc,EAAE;gBACvB,CAAC,CAAC;oBACE,IAAI,EAAE,cAAc,CAAC,IAAI;oBACzB,IAAI,EAAE,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS;iBAC9C,CAAC;YAEN,IAAI,CAAC,YAAY,EAAE;gBACjB,EAAE,CAAC,aAAa,CACd,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,uBAAuB,CAAC,EAChD,IAAI,CAAC,SAAS,CAAC,mBAAmB,CAAC,CACpC,CAAC;aACH;QACH,CAAC;QAED,kBAAkB,EAAE;YAClB,SAAS,EAAE,IAAI,CAAC,EAAE;gBAChB,IAAI,CAAC,YAAY,EAAE;oBACjB,OAAO,SAAS,CAAC;iBAClB;gBAED,OAAO;oBACL,IAAI;oBAEJ,IAAI,EAAE;wBACJ;4BACE,GAAG,EAAE,QAAQ;4BACb,QAAQ,EAAE,cAAc;4BACxB,QAAQ,EAAE,oCACR,kBAAkB;gCAChB,CAAC,CAAC,qBAAqB;gCACvB,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,mBAAmB,IAAI,cAAc,CAC1D,GAAG;yBACJ;qBACF;iBACF,CAAC;YACJ,CAAC;SACF;KACF,CAAC;AACJ,CAAC","sourcesContent":["import fs from \"fs\";\nimport path from \"path\";\n\nimport type { PluginOption, UserConfig } from \"vite\";\nimport type { NormalizedOutputOptions, OutputBundle } from \"rollup\";\n\nimport type { HvAppShellConfig } from \"@hitachivantara/app-shell-shared\";\n\nimport { getAppModules, getMainApp, getPublicPath } from \"./config-utils.js\";\n\nenum ViteCommand {\n BUILD = \"build\",\n SERVE = \"serve\"\n}\n\n/**\n * Process configuration, executing several tasks:\n * - Create rollup configuration to support module creation\n * - Generates final transformed configuration json\n * - \"base\" value is always \"./\" for build, and main app baseUrl for preview or dev\n * @param root Project root directory.\n * @param appShellConfig The original App Shell configuration json.\n * @param selfAppName The name of the application bundle being built.\n * @param buildEntryPoint If true, the index.html entry point will be added to the bundle.\n */\nexport default function processConfiguration(\n root: string,\n appShellConfig: HvAppShellConfig,\n selfAppName: string,\n buildEntryPoint: boolean,\n inlineConfig: boolean,\n generateEmptyShell: boolean\n): PluginOption {\n const selfApp = getMainApp(appShellConfig);\n let finalAppShellConfig: HvAppShellConfig;\n\n return {\n name: \"vite-plugin-appShell-configuration-processor\",\n\n config(config: UserConfig, { command }) {\n const projectRoot = root ?? config.root;\n\n const publicPath = getPublicPath(appShellConfig);\n let appModules = {};\n if (!generateEmptyShell) {\n appModules = getAppModules(projectRoot, appShellConfig, selfAppName);\n console.info(\"Modules exported by the application bundle:\", appModules);\n }\n\n return {\n build: {\n rollupOptions: {\n preserveEntrySignatures: \"strict\",\n input: {\n ...(buildEntryPoint &&\n fs.existsSync(path.resolve(projectRoot, \"index.html\"))\n ? { main: path.resolve(projectRoot, \"index.html\") }\n : {}),\n ...appModules\n },\n output: {\n entryFileNames: \"[name].js\"\n }\n }\n },\n // if serve (preview/dev) it uses the baseUrl. Otherwise(build), use ./\n base: command === ViteCommand.SERVE ? publicPath : \"./\"\n };\n },\n\n /**\n * Rollup hook with the info for bundle generation\n * It will be used to create a new configuration with:\n * - bundles replace with the final location (e.g. -> \"bundle\": \"src/pages/Main\" transformed to \"bundle\": \"pages/Main.js\",\n * @param options build options\n * @param bundle bundles information\n */\n async generateBundle(\n options: NormalizedOutputOptions,\n bundle: OutputBundle\n ) {\n if (generateEmptyShell) {\n return;\n }\n\n // obtain the directory (dist) where the new config file will be placed\n let targetDir: string | undefined;\n if (options.dir) {\n targetDir = options.dir;\n } else if (options.file) {\n targetDir = path.dirname(options.file);\n }\n\n if (!targetDir) {\n throw new Error(\n \"Please set outputPath, so we can know where to place the json file\"\n );\n }\n\n // create the targetDir if it does not exist\n if (!fs.existsSync(targetDir)) {\n fs.mkdirSync(targetDir, { recursive: true });\n }\n\n /**\n * Creating a map with each chunk and the final name. Only the bundles with type=chunk are important\n * Filename do not include the src path at the value\n */\n const chunks: Record<string, string> = {};\n\n Object.keys(bundle).forEach(key => {\n const chunk = bundle[key];\n if (chunk.type === \"chunk\") {\n const outputChunk = chunk;\n if (outputChunk.isEntry) {\n const { fileName } = outputChunk;\n const { name } = outputChunk;\n\n chunks[name] = fileName;\n }\n }\n });\n\n if (selfApp) {\n selfApp.views = selfApp.views?.map(view => {\n const bundleName = view.bundle\n .replace(/^src\\//, \"\")\n .replaceAll(/\\$/g, \"_\");\n return {\n ...view,\n bundle: chunks[bundleName]\n };\n });\n selfApp.modules = selfApp.modules?.map(module => {\n const bundleName = module.bundle.replace(/^src\\//, \"\");\n return {\n ...module,\n bundle: chunks[bundleName]\n };\n });\n\n // replace references to @self with the name of this application bundle\n selfApp.id = selfAppName;\n\n // also replace implicit references to selfApp in other parts of the configuration\n const { theming } = appShellConfig;\n if (theming != null) {\n theming.themes = theming.themes?.map(theme => {\n if (\n theme.startsWith(\"@self/\") ||\n theme.startsWith(selfAppName) ||\n theme.startsWith(\"/src/\")\n ) {\n const bundleName = theme\n .replace(/^@self\\//, \"\")\n .replace(new RegExp(`^${selfAppName}/`), \"\")\n .replace(/^(\\/?)src\\//, \"\");\n return `${selfAppName}/${chunks[bundleName]}`;\n }\n\n return theme;\n });\n }\n }\n\n finalAppShellConfig = buildEntryPoint\n ? { ...appShellConfig }\n : {\n name: appShellConfig.name,\n apps: selfApp != null ? [selfApp] : undefined\n };\n\n if (!inlineConfig) {\n fs.writeFileSync(\n path.resolve(targetDir, \"app-shell.config.json\"),\n JSON.stringify(finalAppShellConfig)\n );\n }\n },\n\n transformIndexHtml: {\n transform: html => {\n if (!inlineConfig) {\n return undefined;\n }\n\n return {\n html,\n\n tags: [\n {\n tag: \"script\",\n injectTo: \"head-prepend\",\n children: `globalThis.__appshell_config__ = ${\n generateEmptyShell\n ? \"%%APPSHELL_CONFIG%%\"\n : JSON.stringify(finalAppShellConfig ?? appShellConfig)\n };`\n }\n ]\n };\n }\n }\n };\n}\n"]}
1
+ {"version":3,"file":"vite-configuration-processor-plugin.js","sourceRoot":"","sources":["../src/vite-configuration-processor-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAYxB,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEjE,IAAK,WAGJ;AAHD,WAAK,WAAW;IACd,8BAAe,CAAA;IACf,8BAAe,CAAA;AACjB,CAAC,EAHI,WAAW,KAAX,WAAW,QAGf;AAOD,SAAS,cAAc,CAAC,KAAa;IACnC,OAAO,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,WAAW,CAAC,KAAa;IAChC,OAAO,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;AACvC,CAAC;AAED,SAAS,uBAAuB,CAC9B,OAA2B,EAC3B,WAAmB;IAEnB,OAAO,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAAE;QACpC,IAAI,cAAc,CAAC,gBAAgB,CAAC,MAAM,CAAC,EAAE,CAAC;YAC5C,MAAM,UAAU,GAAG,WAAW,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;YACxD,OAAO,EAAE,GAAG,gBAAgB,EAAE,MAAM,EAAE,GAAG,WAAW,IAAI,UAAU,EAAE,EAAE,CAAC;QACzE,CAAC;QACD,OAAO,gBAAgB,CAAC;IAC1B,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAC1C,IAAY,EACZ,cAAgC,EAChC,WAAmB,EACnB,eAAwB,EACxB,YAAqB,EACrB,kBAA2B,EAC3B,UAAoB,EAAE;IAEtB,IAAI,mBAAqC,CAAC;IAE1C,OAAO;Q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AC,KAAK,EACnC,WAAW,CACe,CAAC;YAC/B,CAAC;YAED,IAAI,mBAAmB,CAAC,MAAM,EAAE,OAAO,IAAI,IAAI,EAAE,CAAC;gBAChD,mBAAmB,CAAC,MAAM,CAAC,OAAO,GAAG,uBAAuB,CAC1D,mBAAmB,CAAC,MAAM,EAAE,OAAO,EACnC,WAAW,CACZ,CAAC;YACJ,CAAC;YAED,IAAI,CAAC,YAAY,EAAE,CAAC;gBAClB,EAAE,CAAC,aAAa,CACd,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,uBAAuB,CAAC,EAChD,IAAI,CAAC,SAAS,CAAC,mBAAmB,CAAC,CACpC,CAAC;YACJ,CAAC;QACH,CAAC;QAED,kBAAkB,EAAE;YAClB,OAAO,EAAE,IAAI,CAAC,EAAE;gBACd,IAAI,CAAC,YAAY,EAAE,CAAC;oBAClB,OAAO,SAAS,CAAC;gBACnB,CAAC;gBAED,OAAO;oBACL,IAAI;oBAEJ,IAAI,EAAE;wBACJ;4BACE,GAAG,EAAE,QAAQ;4BACb,QAAQ,EAAE,cAAc;4BACxB,QAAQ,EAAE,oCACR,kBAAkB;gCAChB,CAAC,CAAC,qBAAqB;gCACvB,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,mBAAmB,IAAI,cAAc,CAC1D,GAAG;yBACJ;qBACF;iBACF,CAAC;YACJ,CAAC;SACF;KACF,CAAC;AACJ,CAAC","sourcesContent":["import fs from \"fs\";\nimport path from \"path\";\n\nimport type { PluginOption, UserConfig } from \"vite\";\nimport type { NormalizedOutputOptions } from \"rollup\";\n\nimport type {\n HvAppShellConfig,\n HvAppShellHeaderAction,\n HvAppShellProvidersConfig,\n HvAppShellViewsConfig\n} from \"@hitachivantara/app-shell-shared\";\n\nimport { getAppModules, getPublicPath } from \"./config-utils.js\";\n\nenum ViteCommand {\n BUILD = \"build\",\n SERVE = \"serve\"\n}\n\ntype BundleDefinition =\n | HvAppShellProvidersConfig\n | HvAppShellViewsConfig\n | HvAppShellHeaderAction;\n\nfunction startsWithSelf(value: string) {\n return value.startsWith(\"@self/\");\n}\n\nfunction replaceSelf(value: string) {\n return value.replace(/^@self\\//, \"\");\n}\n\nfunction replaceReferencesToSelf(\n bundles: BundleDefinition[],\n selfAppName: string\n) {\n return bundles.map(bundleDefinition => {\n if (startsWithSelf(bundleDefinition.bundle)) {\n const bundleName = replaceSelf(bundleDefinition.bundle);\n return { ...bundleDefinition, bundle: `${selfAppName}/${bundleName}` };\n }\n return bundleDefinition;\n });\n}\n\n/**\n * Process configuration, executing several tasks:\n * - Create rollup configuration to support module creation\n * - Generates final transformed configuration json\n * - \"base\" value is always \"./\" for build, and main app baseUrl for preview or dev\n * @param root Project root directory.\n * @param appShellConfig The original App Shell configuration json.\n * @param selfAppName The name of the application bundle being built.\n * @param buildEntryPoint If true, the index.html entry point will be added to the bundle.\n * @param inlineConfig flag to control if config is included at index.html\n * @param generateEmptyShell flag to control if we are creating an empty AppShell instance\n * @param modules the set of modules to be created by the rollup\n */\nexport default function processConfiguration(\n root: string,\n appShellConfig: HvAppShellConfig,\n selfAppName: string,\n buildEntryPoint: boolean,\n inlineConfig: boolean,\n generateEmptyShell: boolean,\n modules: string[] = []\n): PluginOption {\n let finalAppShellConfig: HvAppShellConfig;\n\n return {\n name: \"vite-plugin-appShell-configuration-processor\",\n\n config(config: UserConfig, { command }) {\n const projectRoot = root ?? config.root;\n\n const publicPath = getPublicPath(appShellConfig);\n let appModules = {};\n if (!generateEmptyShell) {\n appModules = getAppModules(projectRoot, modules);\n console.info(\"Modules exported by the application bundle:\", appModules);\n }\n\n return {\n build: {\n rollupOptions: {\n preserveEntrySignatures: \"strict\",\n input: {\n ...(buildEntryPoint &&\n fs.existsSync(path.resolve(projectRoot, \"index.html\"))\n ? { main: path.resolve(projectRoot, \"index.html\") }\n : {}),\n ...appModules\n },\n output: {\n entryFileNames: \"[name].js\"\n }\n }\n },\n // if serve (preview/dev) it uses the baseUrl. Otherwise(build), use ./\n base: command === ViteCommand.SERVE ? publicPath : \"./\"\n };\n },\n\n /**\n * Rollup hook with the info for bundle generation\n * It will be used to create a new configuration with:\n * - bundles replace with the final location (e.g. -> \"bundle\": \"src/pages/Main\" transformed to \"bundle\": \"pages/Main.js\",\n * @param options build options\n */\n async generateBundle(options: NormalizedOutputOptions) {\n if (generateEmptyShell || !buildEntryPoint) {\n return;\n }\n\n // obtain the directory (dist) where the new config file will be placed\n let targetDir: string | undefined;\n if (options.dir) {\n targetDir = options.dir;\n } else if (options.file) {\n targetDir = path.dirname(options.file);\n }\n\n if (!targetDir) {\n throw new Error(\n \"Please set outputPath, so we can know where to place the json file\"\n );\n }\n\n // create the targetDir if it does not exist\n if (!fs.existsSync(targetDir)) {\n fs.mkdirSync(targetDir, { recursive: true });\n }\n\n // theming structure does not rely on having the 'bundle' prop\n const { theming } = appShellConfig;\n if (theming != null) {\n theming.themes = theming.themes?.map(theme => {\n if (startsWithSelf(theme)) {\n const bundleName = replaceSelf(theme);\n return `${selfAppName}/${bundleName}`;\n }\n\n return theme;\n });\n }\n\n finalAppShellConfig = { ...appShellConfig };\n finalAppShellConfig.apps = undefined;\n // also replace implicit references to selfApp in other parts of the configuration\n if (finalAppShellConfig.providers != null) {\n finalAppShellConfig.providers = replaceReferencesToSelf(\n finalAppShellConfig.providers,\n selfAppName\n );\n }\n\n if (finalAppShellConfig.mainPanel?.views != null) {\n finalAppShellConfig.mainPanel.views = replaceReferencesToSelf(\n finalAppShellConfig.mainPanel.views,\n selfAppName\n ) as HvAppShellViewsConfig[];\n }\n\n if (finalAppShellConfig.header?.actions != null) {\n finalAppShellConfig.header.actions = replaceReferencesToSelf(\n finalAppShellConfig.header?.actions,\n selfAppName\n );\n }\n\n if (!inlineConfig) {\n fs.writeFileSync(\n path.resolve(targetDir, \"app-shell.config.json\"),\n JSON.stringify(finalAppShellConfig)\n );\n }\n },\n\n transformIndexHtml: {\n handler: html => {\n if (!inlineConfig) {\n return undefined;\n }\n\n return {\n html,\n\n tags: [\n {\n tag: \"script\",\n injectTo: \"head-prepend\",\n children: `globalThis.__appshell_config__ = ${\n generateEmptyShell\n ? \"%%APPSHELL_CONFIG%%\"\n : JSON.stringify(finalAppShellConfig ?? appShellConfig)\n };`\n }\n ]\n };\n }\n }\n };\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  import type { PluginOption } from "vite";
2
2
  import type { HvAppShellConfig } from "@hitachivantara/app-shell-shared";
3
3
  /**
4
- * Add the <BASE> tag at index.html file. Tag value is obtained by the main app ({@link #getMainApp}) baseUrl ({@link #getPublicPath})‘
4
+ * Add the <BASE> tag at index.html file. Tag value is obtained by the baseUrl config value ({@link #getPublicPath})‘
5
5
  * @param appShellConfig The app shell configuration.
6
6
  * @param generateEmptyShell Flag that controls if an empty app shell application is created with tags instead of final values
7
7
  */
@@ -1,6 +1,6 @@
1
1
  import { getPublicPath } from "./config-utils.js";
2
2
  /**
3
- * Add the <BASE> tag at index.html file. Tag value is obtained by the main app ({@link #getMainApp}) baseUrl ({@link #getPublicPath})‘
3
+ * Add the <BASE> tag at index.html file. Tag value is obtained by the baseUrl config value ({@link #getPublicPath})‘
4
4
  * @param appShellConfig The app shell configuration.
5
5
  * @param generateEmptyShell Flag that controls if an empty app shell application is created with tags instead of final values
6
6
  */
@@ -10,8 +10,8 @@ export default function generateBaseTag(appShellConfig, generateEmptyShell) {
10
10
  name: "vite-plugin-generate-base",
11
11
  enforce: "pre",
12
12
  transformIndexHtml: {
13
- enforce: "post",
14
- transform: (html) => ({
13
+ order: "post",
14
+ handler: (html) => ({
15
15
  html: generateEmptyShell || appShellConfig.name != null
16
16
  ? html.replace(/<title>(.*?)<\/title>/, `<title>${generateEmptyShell
17
17
  ? "%%APPSHELL_TITLE%%"
@@ -1 +1 @@
1
- {"version":3,"file":"vite-generate-base-plugin.js","sourceRoot":"","sources":["../src/vite-generate-base-plugin.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CACrC,cAAgC,EAChC,kBAA2B;IAE3B,MAAM,UAAU,GAAG,aAAa,CAAC,cAAc,CAAC,CAAC;IAEjD,OAAO;QACL,IAAI,EAAE,2BAA2B;QACjC,OAAO,EAAE,KAAK;QACd,kBAAkB,EAAE;YAClB,OAAO,EAAE,MAAM;YACf,SAAS,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC;gBAC5B,IAAI,EACF,kBAAkB,IAAI,cAAc,CAAC,IAAI,IAAI,IAAI;oBAC/C,CAAC,CAAC,IAAI,CAAC,OAAO,CACV,uBAAuB,EACvB,UACE,kBAAkB;wBAChB,CAAC,CAAC,oBAAoB;wBACtB,CAAC,CAAC,cAAc,CAAC,IACrB,UAAU,CACX;oBACH,CAAC,CAAC,IAAI;gBACV,IAAI,EAAE;oBACJ;wBACE,GAAG,EAAE,MAAM;wBACX,KAAK,EAAE;4BACL,IAAI,EAAE,kBAAkB,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,UAAU;yBAC5D;wBACD,QAAQ,EAAE,cAAc;qBACzB;oBACD;wBACE,GAAG,EAAE,MAAM;wBACX,QAAQ,EAAE,cAAc;wBACxB,KAAK,EAAE;4BACL,GAAG,EAAE,SAAS;4BACd,EAAE,EAAE,OAAO;4BACX,IAAI,EAAE,mBAAmB;yBAC1B;qBACF;iBACF;aACF,CAAC;SACH;KACF,CAAC;AACJ,CAAC","sourcesContent":["import type { PluginOption } from \"vite\";\n\nimport type { HvAppShellConfig } from \"@hitachivantara/app-shell-shared\";\n\nimport { getPublicPath } from \"./config-utils.js\";\n\n/**\n * Add the <BASE> tag at index.html file. Tag value is obtained by the main app ({@link #getMainApp}) baseUrl ({@link #getPublicPath})‘\n * @param appShellConfig The app shell configuration.\n * @param generateEmptyShell Flag that controls if an empty app shell application is created with tags instead of final values\n */\nexport default function generateBaseTag(\n appShellConfig: HvAppShellConfig,\n generateEmptyShell: boolean\n): PluginOption {\n const publicPath = getPublicPath(appShellConfig);\n\n return {\n name: \"vite-plugin-generate-base\",\n enforce: \"pre\",\n transformIndexHtml: {\n enforce: \"post\",\n transform: (html: string) => ({\n html:\n generateEmptyShell || appShellConfig.name != null\n ? html.replace(\n /<title>(.*?)<\\/title>/,\n `<title>${\n generateEmptyShell\n ? \"%%APPSHELL_TITLE%%\"\n : appShellConfig.name\n }</title>`\n )\n : html,\n tags: [\n {\n tag: \"base\",\n attrs: {\n href: generateEmptyShell ? \"%%APPSHELL_BASE%%\" : publicPath\n },\n injectTo: \"head-prepend\"\n },\n {\n tag: \"link\",\n injectTo: \"head-prepend\",\n attrs: {\n rel: \"preload\",\n as: \"image\",\n href: \"./icons/icons.svg\"\n }\n }\n ]\n })\n }\n };\n}\n"]}
1
+ {"version":3,"file":"vite-generate-base-plugin.js","sourceRoot":"","sources":["../src/vite-generate-base-plugin.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CACrC,cAAgC,EAChC,kBAA2B;IAE3B,MAAM,UAAU,GAAG,aAAa,CAAC,cAAc,CAAC,CAAC;IAEjD,OAAO;QACL,IAAI,EAAE,2BAA2B;QACjC,OAAO,EAAE,KAAK;QACd,kBAAkB,EAAE;YAClB,KAAK,EAAE,MAAM;YACb,OAAO,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC;gBAC1B,IAAI,EACF,kBAAkB,IAAI,cAAc,CAAC,IAAI,IAAI,IAAI;oBAC/C,CAAC,CAAC,IAAI,CAAC,OAAO,CACV,uBAAuB,EACvB,UACE,kBAAkB;wBAChB,CAAC,CAAC,oBAAoB;wBACtB,CAAC,CAAC,cAAc,CAAC,IACrB,UAAU,CACX;oBACH,CAAC,CAAC,IAAI;gBACV,IAAI,EAAE;oBACJ;wBACE,GAAG,EAAE,MAAM;wBACX,KAAK,EAAE;4BACL,IAAI,EAAE,kBAAkB,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,UAAU;yBAC5D;wBACD,QAAQ,EAAE,cAAc;qBACzB;oBACD;wBACE,GAAG,EAAE,MAAM;wBACX,QAAQ,EAAE,cAAc;wBACxB,KAAK,EAAE;4BACL,GAAG,EAAE,SAAS;4BACd,EAAE,EAAE,OAAO;4BACX,IAAI,EAAE,mBAAmB;yBAC1B;qBACF;iBACF;aACF,CAAC;SACH;KACF,CAAC;AACJ,CAAC","sourcesContent":["import type { PluginOption } from \"vite\";\n\nimport type { HvAppShellConfig } from \"@hitachivantara/app-shell-shared\";\n\nimport { getPublicPath } from \"./config-utils.js\";\n\n/**\n * Add the <BASE> tag at index.html file. Tag value is obtained by the baseUrl config value ({@link #getPublicPath})‘\n * @param appShellConfig The app shell configuration.\n * @param generateEmptyShell Flag that controls if an empty app shell application is created with tags instead of final values\n */\nexport default function generateBaseTag(\n appShellConfig: HvAppShellConfig,\n generateEmptyShell: boolean\n): PluginOption {\n const publicPath = getPublicPath(appShellConfig);\n\n return {\n name: \"vite-plugin-generate-base\",\n enforce: \"pre\",\n transformIndexHtml: {\n order: \"post\",\n handler: (html: string) => ({\n html:\n generateEmptyShell || appShellConfig.name != null\n ? html.replace(\n /<title>(.*?)<\\/title>/,\n `<title>${\n generateEmptyShell\n ? \"%%APPSHELL_TITLE%%\"\n : appShellConfig.name\n }</title>`\n )\n : html,\n tags: [\n {\n tag: \"base\",\n attrs: {\n href: generateEmptyShell ? \"%%APPSHELL_BASE%%\" : publicPath\n },\n injectTo: \"head-prepend\"\n },\n {\n tag: \"link\",\n injectTo: \"head-prepend\",\n attrs: {\n rel: \"preload\",\n as: \"image\",\n href: \"./icons/icons.svg\"\n }\n }\n ]\n })\n }\n };\n}\n"]}
@@ -78,8 +78,8 @@ fi
78
78
  # Replacing the title placeholder in the index.html file:
79
79
  sed -i.bak "s/%%APPSHELL_TITLE%%/\${TITLE//\\//\\\\/}/g" index.html && rm index.html.bak
80
80
 
81
- # Search for "@self" app and get its baseUrl:
82
- SELF_BASEURL=$(echo "\${CONFIG}" | jq -r '.apps[] | select(.id == "@self") | .baseUrl')
81
+ # Getting the baseUrl from the config "baseUrl" property:
82
+ SELF_BASEURL=$(echo "\${CONFIG}" | jq -r '.baseUrl')
83
83
  if [ -z "\${SELF_BASEURL}" ] || [ "\${SELF_BASEURL}" = "null" ] || [ "\${SELF_BASEURL}" = "undefined" ]; then
84
84
  SELF_BASEURL="/"
85
85
  fi
@@ -91,10 +91,10 @@ sed -i.bak "s/%%APPSHELL_BASE%%/\${SELF_BASEURL//\\//\\\\/}/g" index.html && rm
91
91
  # for each app, we add a mapping from the app id to the app url
92
92
  IMPORTMAP="{\\"imports\\":{${SHARED_DEPENDENCIES.map(({ moduleId, bundle }) => `\\"${moduleId}\\":\\"./bundles/${bundle}\\",`).join("")}"
93
93
  while IFS= read -r line; do
94
- id=$(echo "$line" | jq -r '.id')
95
- baseUrl=$(echo "$line" | jq -r '.baseUrl')
94
+ id=$(echo "$line" | jq -r '.key')
95
+ baseUrl=$(echo "$line" | jq -r '.value')
96
96
  IMPORTMAP="\${IMPORTMAP}\\"\${id}/\\":\\"\${baseUrl}\\","
97
- done < <(echo "\${CONFIG}" | jq -c '.apps[]')
97
+ done < <(echo "\${CONFIG}" | jq -c '.apps | to_entries[]')
98
98
  IMPORTMAP="\${IMPORTMAP%?}, ${getExtraDependenciesString()} }}"
99
99
 
100
100
  ${externalImportMap
@@ -1 +1 @@
1
- {"version":3,"file":"vite-generate-bash-script-plugin.js","sourceRoot":"","sources":["../src/vite-generate-bash-script-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAIxB,OAAO,mBAAmB,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAExE,MAAM,CAAC,OAAO,UAAU,kBAAkB,CACxC,iBAA0B,EAC1B,YAA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E,cAAc,CAAC,EAAE,MAAM,EAAE;gBAC9D,QAAQ,EAAE,OAAO;aAClB,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["import fs from \"fs\";\nimport path from \"path\";\n\nimport type { PluginOption, ResolvedConfig } from \"vite\";\n\nimport SHARED_DEPENDENCIES from \"./shared-dependencies.js\";\nimport { getExtraDependenciesString } from \"./vite-importmap-plugin.js\";\n\nexport default function generateBashScript(\n externalImportMap: boolean,\n inlineConfig: boolean\n): PluginOption {\n let config: ResolvedConfig;\n let targetDir: string | undefined;\n\n return {\n name: \"vite-plugin-generate-bash-script\",\n apply: \"build\",\n\n configResolved(resolvedConfig) {\n config = resolvedConfig;\n targetDir = path.resolve(resolvedConfig.root, \"scripts\");\n\n if (!targetDir) {\n throw new Error(\n \"Please set outputPath, so we can know where to place the bash script file\"\n );\n }\n\n // create the targetDir if it does not exist\n if (!fs.existsSync(targetDir)) {\n fs.mkdirSync(targetDir, { recursive: true });\n }\n },\n closeBundle() {\n if (config.command === \"serve\") {\n return;\n }\n\n const script = `#!/bin/bash\nset -e\nset -o pipefail\n\n# This script is generated by @hitachivantara/app-shell-vite-plugin.\n# Do not edit this file directly.\n\n# This script will read the app-shell.config.json file and generate the importmap.\n\n${\n externalImportMap\n ? \"# The script will generate the importmap.js file.\"\n : \"# The importmap will be inlined in the index.html file, by replacing the %%APPSHELL_IMPORTMAP%% placeholder.\"\n}\n${\n inlineConfig\n ? \"# The config file will be inlined in the index.html file, by replacing the %%APPSHELL_CONFIG%% placeholder.\"\n : \"# The config will be saved as app-shell.config.json.\"\n}\n\n# Check if the index.html file exists in the current directory, otherwise exit:\nif [ ! -f index.html ]; then\n echo \"index.html file not found. Are you running this script in the correct directory?\" >&2\n exit 1\nfi\n\nCONFIG_FILE=\\${1:-app-shell.config.json}\n\n# Check if the config file exists, otherwise exit:\nif [ ! -f \"\\${CONFIG_FILE}\" ]; then\n echo \"Config file not found: \\${CONFIG_FILE}\" >&2\n exit 1\nfi\n\nSCRIPT_DIR=\"$(cd \"$(dirname \"\\${BASH_SOURCE[0]}\")\" && pwd)\"\nINDEX_HTML_ORIGINAL=\"\\${SCRIPT_DIR}/index.html.original\"\n\n# If the index.html doesn't contain any %%APPSHELL_*%% placeholders, copy the index.html.original at the script location:\nif ! grep -q \"%%APPSHELL_\" index.html; then\n if [ -f \"\\${INDEX_HTML_ORIGINAL}\" ]; then\n cp \"\\${INDEX_HTML_ORIGINAL}\" index.html\n fi\nelse\n # Backup the index.html file to index.html.original, in the current script folder:\n cp index.html \"\\${INDEX_HTML_ORIGINAL}\"\nfi\n\n# Reading the app-shell.config.json file:\nCONFIG=$(cat \"\\${CONFIG_FILE}\")\n\n# Getting the title from the config \"name\" property:\nTITLE=$(echo \"\\${CONFIG}\" | jq -r '.name')\nif [ -z \"\\${TITLE}\" ] || [ \"\\${TITLE}\" = \"null\" ] || [ \"\\${TITLE}\" = \"undefined\" ]; then\n TITLE=\"Hitachi Vantara\"\nfi\n\n# Replacing the title placeholder in the index.html file:\nsed -i.bak \"s/%%APPSHELL_TITLE%%/\\${TITLE//\\\\//\\\\\\\\/}/g\" index.html && rm index.html.bak\n\n# Search for \"@self\" app and get its baseUrl:\nSELF_BASEURL=$(echo \"\\${CONFIG}\" | jq -r '.apps[] | select(.id == \"@self\") | .baseUrl')\nif [ -z \"\\${SELF_BASEURL}\" ] || [ \"\\${SELF_BASEURL}\" = \"null\" ] || [ \"\\${SELF_BASEURL}\" = \"undefined\" ]; then\n SELF_BASEURL=\"/\"\nfi\n\n# Replace the base placeholder in the index.html file:\nsed -i.bak \"s/%%APPSHELL_BASE%%/\\${SELF_BASEURL//\\\\//\\\\\\\\/}/g\" index.html && rm index.html.bak\n\n# Generating the importmap:\n# for each app, we add a mapping from the app id to the app url\nIMPORTMAP=\"{\\\\\"imports\\\\\":{${SHARED_DEPENDENCIES.map(\n ({ moduleId, bundle }) => `\\\\\"${moduleId}\\\\\":\\\\\"./bundles/${bundle}\\\\\",`\n ).join(\"\")}\"\nwhile IFS= read -r line; do\n id=$(echo \"$line\" | jq -r '.id')\n baseUrl=$(echo \"$line\" | jq -r '.baseUrl')\n IMPORTMAP=\"\\${IMPORTMAP}\\\\\"\\${id}/\\\\\":\\\\\"\\${baseUrl}\\\\\",\"\ndone < <(echo \"\\${CONFIG}\" | jq -c '.apps[]')\nIMPORTMAP=\"\\${IMPORTMAP%?}, ${getExtraDependenciesString()} }}\"\n\n${\n externalImportMap\n ? `# Generating the importmap.js file:\necho \"const im = document.createElement('script'); im.type = 'importmap'; im.textContent = \\\\\\`\\${IMPORTMAP}\\\\\\`; document.currentScript.after(im);\" >importmap.js`\n : `# Inlining the importmap in the index.html file:\nsed -i.bak \"s/%%APPSHELL_IMPORTMAP%%/\\${IMPORTMAP//\\\\//\\\\\\\\/}/g\" index.html && rm index.html.bak`\n}\n\n${\n inlineConfig\n ? `# Inlining the config in the index.html file:\nCONFIG=$(echo \"\\${CONFIG}\" | tr -d '\\\\n')\nsed -i.bak \"s/%%APPSHELL_CONFIG%%/\\${CONFIG//\\\\//\\\\\\\\/}/g\" index.html && rm index.html.bak\n\n# Removing the config file, just in case:\nrm -f app-shell.config.json`\n : `if [ \"\\${CONFIG_FILE}\" != \"app-shell.config.json\" ]; then\n echo \"\\${CONFIG}\" >app-shell.config.json\nfi`\n}\n`;\n\n fs.writeFileSync(path.join(targetDir!, \"app-shell.sh\"), script, {\n encoding: \"utf-8\"\n });\n }\n };\n}\n"]}
1
+ {"version":3,"file":"vite-generate-bash-script-plugin.js","sourceRoot":"","sources":["../src/vite-generate-bash-script-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAIxB,OAAO,mBAAmB,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAExE,MAAM,CAAC,OAAO,UAAU,kBAAkB,CACxC,iBAA0B,EAC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AAa,CAAC,IAAI,CAAC,IAAI,CAAC,SAAU,EAAE,cAAc,CAAC,EAAE,MAAM,EAAE;gBAC9D,QAAQ,EAAE,OAAO;aAClB,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["import fs from \"fs\";\nimport path from \"path\";\n\nimport type { PluginOption, ResolvedConfig } from \"vite\";\n\nimport SHARED_DEPENDENCIES from \"./shared-dependencies.js\";\nimport { getExtraDependenciesString } from \"./vite-importmap-plugin.js\";\n\nexport default function generateBashScript(\n externalImportMap: boolean,\n inlineConfig: boolean\n): PluginOption {\n let config: ResolvedConfig;\n let targetDir: string | undefined;\n\n return {\n name: \"vite-plugin-generate-bash-script\",\n apply: \"build\",\n\n configResolved(resolvedConfig) {\n config = resolvedConfig;\n targetDir = path.resolve(resolvedConfig.root, \"scripts\");\n\n if (!targetDir) {\n throw new Error(\n \"Please set outputPath, so we can know where to place the bash script file\"\n );\n }\n\n // create the targetDir if it does not exist\n if (!fs.existsSync(targetDir)) {\n fs.mkdirSync(targetDir, { recursive: true });\n }\n },\n closeBundle() {\n if (config.command === \"serve\") {\n return;\n }\n\n const script = `#!/bin/bash\nset -e\nset -o pipefail\n\n# This script is generated by @hitachivantara/app-shell-vite-plugin.\n# Do not edit this file directly.\n\n# This script will read the app-shell.config.json file and generate the importmap.\n\n${\n externalImportMap\n ? \"# The script will generate the importmap.js file.\"\n : \"# The importmap will be inlined in the index.html file, by replacing the %%APPSHELL_IMPORTMAP%% placeholder.\"\n}\n${\n inlineConfig\n ? \"# The config file will be inlined in the index.html file, by replacing the %%APPSHELL_CONFIG%% placeholder.\"\n : \"# The config will be saved as app-shell.config.json.\"\n}\n\n# Check if the index.html file exists in the current directory, otherwise exit:\nif [ ! -f index.html ]; then\n echo \"index.html file not found. Are you running this script in the correct directory?\" >&2\n exit 1\nfi\n\nCONFIG_FILE=\\${1:-app-shell.config.json}\n\n# Check if the config file exists, otherwise exit:\nif [ ! -f \"\\${CONFIG_FILE}\" ]; then\n echo \"Config file not found: \\${CONFIG_FILE}\" >&2\n exit 1\nfi\n\nSCRIPT_DIR=\"$(cd \"$(dirname \"\\${BASH_SOURCE[0]}\")\" && pwd)\"\nINDEX_HTML_ORIGINAL=\"\\${SCRIPT_DIR}/index.html.original\"\n\n# If the index.html doesn't contain any %%APPSHELL_*%% placeholders, copy the index.html.original at the script location:\nif ! grep -q \"%%APPSHELL_\" index.html; then\n if [ -f \"\\${INDEX_HTML_ORIGINAL}\" ]; then\n cp \"\\${INDEX_HTML_ORIGINAL}\" index.html\n fi\nelse\n # Backup the index.html file to index.html.original, in the current script folder:\n cp index.html \"\\${INDEX_HTML_ORIGINAL}\"\nfi\n\n# Reading the app-shell.config.json file:\nCONFIG=$(cat \"\\${CONFIG_FILE}\")\n\n# Getting the title from the config \"name\" property:\nTITLE=$(echo \"\\${CONFIG}\" | jq -r '.name')\nif [ -z \"\\${TITLE}\" ] || [ \"\\${TITLE}\" = \"null\" ] || [ \"\\${TITLE}\" = \"undefined\" ]; then\n TITLE=\"Hitachi Vantara\"\nfi\n\n# Replacing the title placeholder in the index.html file:\nsed -i.bak \"s/%%APPSHELL_TITLE%%/\\${TITLE//\\\\//\\\\\\\\/}/g\" index.html && rm index.html.bak\n\n# Getting the baseUrl from the config \"baseUrl\" property:\nSELF_BASEURL=$(echo \"\\${CONFIG}\" | jq -r '.baseUrl')\nif [ -z \"\\${SELF_BASEURL}\" ] || [ \"\\${SELF_BASEURL}\" = \"null\" ] || [ \"\\${SELF_BASEURL}\" = \"undefined\" ]; then\n SELF_BASEURL=\"/\"\nfi\n\n# Replace the base placeholder in the index.html file:\nsed -i.bak \"s/%%APPSHELL_BASE%%/\\${SELF_BASEURL//\\\\//\\\\\\\\/}/g\" index.html && rm index.html.bak\n\n# Generating the importmap:\n# for each app, we add a mapping from the app id to the app url\nIMPORTMAP=\"{\\\\\"imports\\\\\":{${SHARED_DEPENDENCIES.map(\n ({ moduleId, bundle }) => `\\\\\"${moduleId}\\\\\":\\\\\"./bundles/${bundle}\\\\\",`\n ).join(\"\")}\"\nwhile IFS= read -r line; do\n id=$(echo \"$line\" | jq -r '.key')\n baseUrl=$(echo \"$line\" | jq -r '.value')\n IMPORTMAP=\"\\${IMPORTMAP}\\\\\"\\${id}/\\\\\":\\\\\"\\${baseUrl}\\\\\",\"\ndone < <(echo \"\\${CONFIG}\" | jq -c '.apps | to_entries[]')\nIMPORTMAP=\"\\${IMPORTMAP%?}, ${getExtraDependenciesString()} }}\"\n\n${\n externalImportMap\n ? `# Generating the importmap.js file:\necho \"const im = document.createElement('script'); im.type = 'importmap'; im.textContent = \\\\\\`\\${IMPORTMAP}\\\\\\`; document.currentScript.after(im);\" >importmap.js`\n : `# Inlining the importmap in the index.html file:\nsed -i.bak \"s/%%APPSHELL_IMPORTMAP%%/\\${IMPORTMAP//\\\\//\\\\\\\\/}/g\" index.html && rm index.html.bak`\n}\n\n${\n inlineConfig\n ? `# Inlining the config in the index.html file:\nCONFIG=$(echo \"\\${CONFIG}\" | tr -d '\\\\n')\nsed -i.bak \"s/%%APPSHELL_CONFIG%%/\\${CONFIG//\\\\//\\\\\\\\/}/g\" index.html && rm index.html.bak\n\n# Removing the config file, just in case:\nrm -f app-shell.config.json`\n : `if [ \"\\${CONFIG_FILE}\" != \"app-shell.config.json\" ]; then\n echo \"\\${CONFIG}\" >app-shell.config.json\nfi`\n}\n`;\n\n fs.writeFileSync(path.join(targetDir!, \"app-shell.sh\"), script, {\n encoding: \"utf-8\"\n });\n }\n };\n}\n"]}
@@ -10,5 +10,5 @@ export declare const getExtraDependenciesString: () => string;
10
10
  * @param importmapElements The importmap elements to be included
11
11
  * @param sharedDependencies The shared packages (other than application bundles)
12
12
  */
13
- export default function generateImportmap(importmapElements: Record<string, string>, sharedDependencies: string[], externalImportMap?: boolean, placeholderEntryPoint?: boolean): PluginOption;
13
+ export default function generateImportmap(importmapElements: Record<string, string>, packageName: string, sharedDependencies: string[], externalImportMap?: boolean, placeholderEntryPoint?: boolean): PluginOption;
14
14
  //# sourceMappingURL=vite-importmap-plugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"vite-importmap-plugin.d.ts","sourceRoot":"","sources":["../src/vite-importmap-plugin.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAMzC,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAEpD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,0BAA0B,QAAO,MAQ7C,CAAC;AAsCF;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB,CACvC,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACzC,kBAAkB,EAAE,MAAM,EAAE,EAC5B,iBAAiB,UAAQ,EACzB,qBAAqB,UAAQ,GAC5B,YAAY,CAmLd"}
1
+ {"version":3,"file":"vite-importmap-plugin.d.ts","sourceRoot":"","sources":["../src/vite-importmap-plugin.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAMzC,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAEpD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,0BAA0B,QAAO,MAQ7C,CAAC;AA4CF;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB,CACvC,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACzC,WAAW,EAAE,MAAM,EACnB,kBAAkB,EAAE,MAAM,EAAE,EAC5B,iBAAiB,UAAQ,EACzB,qBAAqB,UAAQ,GAC5B,YAAY,CAmLd"}
@@ -18,14 +18,14 @@ export const getExtraDependenciesString = () => {
18
18
  extraDependenciesString = extraDependenciesString.slice(0, -1);
19
19
  return extraDependenciesString;
20
20
  };
21
- function replaceIdPrefix(keys) {
22
- const reg = new RegExp(`${ID_PREFIX}(${keys.join("|")})`, "g");
21
+ function replaceIdPrefix(keys, packageName) {
22
+ const reg = new RegExp(`(/${packageName})?${ID_PREFIX}(${keys.join("|")})`, "g");
23
23
  return {
24
24
  name: "vite-plugin-importmap-replace-idprefix",
25
25
  enforce: "pre",
26
26
  apply: "serve",
27
27
  // while in dev, we need to prevent 'vite:import-analysis' on runtime modules
28
- transform: code => reg.test(code) ? code.replace(reg, (m, s1) => s1) : code,
28
+ transform: code => reg.test(code) ? code.replace(reg, (m, s1, s2) => s2) : code,
29
29
  // and to say its resolved (as external)
30
30
  resolveId: (id) => keys.some(key => typeof key === "string" ? id.startsWith(key) : key.test(id))
31
31
  ? {
@@ -49,7 +49,7 @@ function replaceIdPrefix(keys) {
49
49
  * @param importmapElements The importmap elements to be included
50
50
  * @param sharedDependencies The shared packages (other than application bundles)
51
51
  */
52
- export default function generateImportmap(importmapElements, sharedDependencies, externalImportMap = false, placeholderEntryPoint = false) {
52
+ export default function generateImportmap(importmapElements, packageName, sharedDependencies, externalImportMap = false, placeholderEntryPoint = false) {
53
53
  const keys = Object.keys(importmapElements);
54
54
  const devKeys = keys.filter(key => !sharedDependencies.some(lib => lib.startsWith(key)));
55
55
  let devMode = false;
@@ -97,7 +97,7 @@ document.currentScript.after(im);
97
97
  // we wrap it and check our excluded modules first and call the original function if needed
98
98
  const originalExternal = returnValue.build.rollupOptions.external;
99
99
  returnValue.build.rollupOptions.external = (id, ...args) => {
100
- if (excludedModules.some(m => typeof m === id)) {
100
+ if (excludedModules.some(m => m === id)) {
101
101
  return true;
102
102
  }
103
103
  return originalExternal(id, ...args);
@@ -126,7 +126,7 @@ document.currentScript.after(im);
126
126
  }
127
127
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
128
128
  // @ts-ignore an hack: we want to add the plugin only after the config is resolved
129
- resolvedConfig.plugins.push(replaceIdPrefix(devKeys));
129
+ resolvedConfig.plugins.push(replaceIdPrefix(devKeys, packageName));
130
130
  },
131
131
  /**
132
132
  * Rollup hook with the info for bundle generation
@@ -160,8 +160,8 @@ document.currentScript.after(im);
160
160
  },
161
161
  // inject the importmap script and also the es-module-shims script
162
162
  transformIndexHtml: {
163
- enforce: "post",
164
- transform: html => ({
163
+ order: "post",
164
+ handler: html => ({
165
165
  html,
166
166
  tags: [
167
167
  {