@hitachivantara/app-shell-vite-plugin 0.5.1 → 0.6.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.
@@ -1,3 +1,3 @@
1
1
  /* @preserve react (18.2.0) esm bundle generated by Hitachi Vantara - Boba Fett team */
2
- function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var t,r={},n={};function o(){if(t)return n;t=1;var e=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),f=Symbol.for("react.context"),i=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),l=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),y=Symbol.iterator;var d={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,_={};function h(e,t,r){this.props=e,this.context=t,this.refs=_,this.updater=r||d}function v(){}function b(e,t,r){this.props=e,this.context=t,this.refs=_,this.updater=r||d}h.prototype.isReactComponent={},h.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)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,e,t,"setState")},h.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=h.prototype;var S=b.prototype=new v;S.constructor=b,m(S,h.prototype),S.isPureReactComponent=!0;var E=Array.isArray,R=Object.prototype.hasOwnProperty,C={current:null},w={key:!0,ref:!0,__self:!0,__source:!0};function $(t,r,n){var o,u={},a=null,c=null;if(null!=r)for(o in void 0!==r.ref&&(c=r.ref),void 0!==r.key&&(a=""+r.key),r)R.call(r,o)&&!w.hasOwnProperty(o)&&(u[o]=r[o]);var f=arguments.length-2;if(1===f)u.children=n;else if(1<f){for(var i=Array(f),s=0;s<f;s++)i[s]=arguments[s+2];u.children=i}if(t&&t.defaultProps)for(o in f=t.defaultProps)void 0===u[o]&&(u[o]=f[o]);return{$$typeof:e,type:t,key:a,ref:c,props:u,_owner:C.current}}function k(t){return"object"==typeof t&&null!==t&&t.$$typeof===e}var g=/\/+/g;function j(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function x(t,n,o,u,a){var c=typeof t;"undefined"!==c&&"boolean"!==c||(t=null);var f=!1;if(null===t)f=!0;else switch(c){case"string":case"number":f=!0;break;case"object":switch(t.$$typeof){case e:case r:f=!0}}if(f)return a=a(f=t),t=""===u?"."+j(f,0):u,E(a)?(o="",null!=t&&(o=t.replace(g,"$&/")+"/"),x(a,n,o,"",(function(e){return e}))):null!=a&&(k(a)&&(a=function(t,r){return{$$typeof:e,type:t.type,key:r,ref:t.ref,props:t.props,_owner:t._owner}}(a,o+(!a.key||f&&f.key===a.key?"":(""+a.key).replace(g,"$&/")+"/")+t)),n.push(a)),1;if(f=0,u=""===u?".":u+":",E(t))for(var i=0;i<t.length;i++){var s=u+j(c=t[i],i);f+=x(c,n,o,s,a)}else if(s=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=y&&e[y]||e["@@iterator"])?e:null}(t),"function"==typeof s)for(t=s.call(t),i=0;!(c=t.next()).done;)f+=x(c=c.value,n,o,s=u+j(c,i++),a);else if("object"===c)throw n=String(t),Error("Objects are not valid as a React child (found: "+("[object Object]"===n?"object with keys {"+Object.keys(t).join(", ")+"}":n)+"). If you meant to render a collection of children, use an array instead.");return f}function O(e,t,r){if(null==e)return e;var n=[],o=0;return x(e,n,"","",(function(e){return t.call(r,e,o++)})),n}function P(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var I={current:null},V={transition:null},D={ReactCurrentDispatcher:I,ReactCurrentBatchConfig:V,ReactCurrentOwner:C};return n.Children={map:O,forEach:function(e,t,r){O(e,(function(){t.apply(this,arguments)}),r)},count:function(e){var t=0;return O(e,(function(){t++})),t},toArray:function(e){return O(e,(function(e){return e}))||[]},only:function(e){if(!k(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},n.Component=h,n.Fragment=o,n.Profiler=a,n.PureComponent=b,n.StrictMode=u,n.Suspense=s,n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=D,n.cloneElement=function(t,r,n){if(null==t)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var o=m({},t.props),u=t.key,a=t.ref,c=t._owner;if(null!=r){if(void 0!==r.ref&&(a=r.ref,c=C.current),void 0!==r.key&&(u=""+r.key),t.type&&t.type.defaultProps)var f=t.type.defaultProps;for(i in r)R.call(r,i)&&!w.hasOwnProperty(i)&&(o[i]=void 0===r[i]&&void 0!==f?f[i]:r[i])}var i=arguments.length-2;if(1===i)o.children=n;else if(1<i){f=Array(i);for(var s=0;s<i;s++)f[s]=arguments[s+2];o.children=f}return{$$typeof:e,type:t.type,key:u,ref:a,props:o,_owner:c}},n.createContext=function(e){return(e={$$typeof:f,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:c,_context:e},e.Consumer=e},n.createElement=$,n.createFactory=function(e){var t=$.bind(null,e);return t.type=e,t},n.createRef=function(){return{current:null}},n.forwardRef=function(e){return{$$typeof:i,render:e}},n.isValidElement=k,n.lazy=function(e){return{$$typeof:p,_payload:{_status:-1,_result:e},_init:P}},n.memo=function(e,t){return{$$typeof:l,type:e,compare:void 0===t?null:t}},n.startTransition=function(e){var t=V.transition;V.transition={};try{e()}finally{V.transition=t}},n.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},n.useCallback=function(e,t){return I.current.useCallback(e,t)},n.useContext=function(e){return I.current.useContext(e)},n.useDebugValue=function(){},n.useDeferredValue=function(e){return I.current.useDeferredValue(e)},n.useEffect=function(e,t){return I.current.useEffect(e,t)},n.useId=function(){return I.current.useId()},n.useImperativeHandle=function(e,t,r){return I.current.useImperativeHandle(e,t,r)},n.useInsertionEffect=function(e,t){return I.current.useInsertionEffect(e,t)},n.useLayoutEffect=function(e,t){return I.current.useLayoutEffect(e,t)},n.useMemo=function(e,t){return I.current.useMemo(e,t)},n.useReducer=function(e,t,r){return I.current.useReducer(e,t,r)},n.useRef=function(e){return I.current.useRef(e)},n.useState=function(e){return I.current.useState(e)},n.useSyncExternalStore=function(e,t,r){return I.current.useSyncExternalStore(e,t,r)},n.useTransition=function(){return I.current.useTransition()},n.version="18.2.0",n}({get exports(){return r},set exports(e){r=e}}).exports=o();var u=e(r);const a=!0,{Fragment:c,StrictMode:f,Profiler:i,Suspense:s,Children:l,Component:p,PureComponent:y,cloneElement:d,createContext:m,createElement:_,createFactory:h,createRef:v,forwardRef:b,isValidElement:S,lazy:E,memo:R,useCallback:C,useContext:w,useDebugValue:$,useEffect:k,useImperativeHandle:g,useLayoutEffect:j,useMemo:x,useReducer:O,useRef:P,useState:I,version:V}=u;export{l as Children,p as Component,c as Fragment,i as Profiler,y as PureComponent,f as StrictMode,s as Suspense,a as __esmModule,d as cloneElement,m as createContext,_ as createElement,h as createFactory,v as createRef,u as default,b as forwardRef,S as isValidElement,E as lazy,R as memo,C as useCallback,w as useContext,$ as useDebugValue,k as useEffect,g as useImperativeHandle,j as useLayoutEffect,x as useMemo,O as useReducer,P as useRef,I as useState,V as version};
2
+ function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var t,r={exports:{}},n={};r.exports=function(){if(t)return n;t=1;var e=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),f=Symbol.for("react.context"),i=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),l=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),y=Symbol.iterator,d={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,_={};function h(e,t,r){this.props=e,this.context=t,this.refs=_,this.updater=r||d}function v(){}function b(e,t,r){this.props=e,this.context=t,this.refs=_,this.updater=r||d}h.prototype.isReactComponent={},h.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)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,e,t,"setState")},h.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=h.prototype;var S=b.prototype=new v;S.constructor=b,m(S,h.prototype),S.isPureReactComponent=!0;var E=Array.isArray,R=Object.prototype.hasOwnProperty,C={current:null},w={key:!0,ref:!0,__self:!0,__source:!0};function $(t,r,n){var o,u={},a=null,c=null;if(null!=r)for(o in void 0!==r.ref&&(c=r.ref),void 0!==r.key&&(a=""+r.key),r)R.call(r,o)&&!w.hasOwnProperty(o)&&(u[o]=r[o]);var f=arguments.length-2;if(1===f)u.children=n;else if(1<f){for(var i=Array(f),s=0;s<f;s++)i[s]=arguments[s+2];u.children=i}if(t&&t.defaultProps)for(o in f=t.defaultProps)void 0===u[o]&&(u[o]=f[o]);return{$$typeof:e,type:t,key:a,ref:c,props:u,_owner:C.current}}function k(t){return"object"==typeof t&&null!==t&&t.$$typeof===e}var g=/\/+/g;function j(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function x(t,n,o,u,a){var c=typeof t;"undefined"!==c&&"boolean"!==c||(t=null);var f=!1;if(null===t)f=!0;else switch(c){case"string":case"number":f=!0;break;case"object":switch(t.$$typeof){case e:case r:f=!0}}if(f)return a=a(f=t),t=""===u?"."+j(f,0):u,E(a)?(o="",null!=t&&(o=t.replace(g,"$&/")+"/"),x(a,n,o,"",(function(e){return e}))):null!=a&&(k(a)&&(a=function(t,r){return{$$typeof:e,type:t.type,key:r,ref:t.ref,props:t.props,_owner:t._owner}}(a,o+(!a.key||f&&f.key===a.key?"":(""+a.key).replace(g,"$&/")+"/")+t)),n.push(a)),1;if(f=0,u=""===u?".":u+":",E(t))for(var i=0;i<t.length;i++){var s=u+j(c=t[i],i);f+=x(c,n,o,s,a)}else if(s=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=y&&e[y]||e["@@iterator"])?e:null}(t),"function"==typeof s)for(t=s.call(t),i=0;!(c=t.next()).done;)f+=x(c=c.value,n,o,s=u+j(c,i++),a);else if("object"===c)throw n=String(t),Error("Objects are not valid as a React child (found: "+("[object Object]"===n?"object with keys {"+Object.keys(t).join(", ")+"}":n)+"). If you meant to render a collection of children, use an array instead.");return f}function O(e,t,r){if(null==e)return e;var n=[],o=0;return x(e,n,"","",(function(e){return t.call(r,e,o++)})),n}function P(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var I={current:null},V={transition:null},D={ReactCurrentDispatcher:I,ReactCurrentBatchConfig:V,ReactCurrentOwner:C};return n.Children={map:O,forEach:function(e,t,r){O(e,(function(){t.apply(this,arguments)}),r)},count:function(e){var t=0;return O(e,(function(){t++})),t},toArray:function(e){return O(e,(function(e){return e}))||[]},only:function(e){if(!k(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},n.Component=h,n.Fragment=o,n.Profiler=a,n.PureComponent=b,n.StrictMode=u,n.Suspense=s,n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=D,n.cloneElement=function(t,r,n){if(null==t)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var o=m({},t.props),u=t.key,a=t.ref,c=t._owner;if(null!=r){if(void 0!==r.ref&&(a=r.ref,c=C.current),void 0!==r.key&&(u=""+r.key),t.type&&t.type.defaultProps)var f=t.type.defaultProps;for(i in r)R.call(r,i)&&!w.hasOwnProperty(i)&&(o[i]=void 0===r[i]&&void 0!==f?f[i]:r[i])}var i=arguments.length-2;if(1===i)o.children=n;else if(1<i){f=Array(i);for(var s=0;s<i;s++)f[s]=arguments[s+2];o.children=f}return{$$typeof:e,type:t.type,key:u,ref:a,props:o,_owner:c}},n.createContext=function(e){return(e={$$typeof:f,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:c,_context:e},e.Consumer=e},n.createElement=$,n.createFactory=function(e){var t=$.bind(null,e);return t.type=e,t},n.createRef=function(){return{current:null}},n.forwardRef=function(e){return{$$typeof:i,render:e}},n.isValidElement=k,n.lazy=function(e){return{$$typeof:p,_payload:{_status:-1,_result:e},_init:P}},n.memo=function(e,t){return{$$typeof:l,type:e,compare:void 0===t?null:t}},n.startTransition=function(e){var t=V.transition;V.transition={};try{e()}finally{V.transition=t}},n.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},n.useCallback=function(e,t){return I.current.useCallback(e,t)},n.useContext=function(e){return I.current.useContext(e)},n.useDebugValue=function(){},n.useDeferredValue=function(e){return I.current.useDeferredValue(e)},n.useEffect=function(e,t){return I.current.useEffect(e,t)},n.useId=function(){return I.current.useId()},n.useImperativeHandle=function(e,t,r){return I.current.useImperativeHandle(e,t,r)},n.useInsertionEffect=function(e,t){return I.current.useInsertionEffect(e,t)},n.useLayoutEffect=function(e,t){return I.current.useLayoutEffect(e,t)},n.useMemo=function(e,t){return I.current.useMemo(e,t)},n.useReducer=function(e,t,r){return I.current.useReducer(e,t,r)},n.useRef=function(e){return I.current.useRef(e)},n.useState=function(e){return I.current.useState(e)},n.useSyncExternalStore=function(e,t,r){return I.current.useSyncExternalStore(e,t,r)},n.useTransition=function(){return I.current.useTransition()},n.version="18.2.0",n}();var o=e(r.exports);const u=!0,{Fragment:a,StrictMode:c,Profiler:f,Suspense:i,Children:s,Component:l,PureComponent:p,cloneElement:y,createContext:d,createElement:m,createFactory:_,createRef:h,forwardRef:v,isValidElement:b,lazy:S,memo:E,useCallback:R,useContext:C,useDebugValue:w,useEffect:$,useImperativeHandle:k,useLayoutEffect:g,useMemo:j,useReducer:x,useRef:O,useState:P,version:I}=o;export{s as Children,l as Component,a as Fragment,f as Profiler,p as PureComponent,c as StrictMode,i as Suspense,u as __esmModule,y as cloneElement,d as createContext,m as createElement,_ as createFactory,h as createRef,o as default,v as forwardRef,b as isValidElement,S as lazy,E as memo,R as useCallback,C as useContext,w as useDebugValue,$ as useEffect,k as useImperativeHandle,g as useLayoutEffect,j as useMemo,x as useReducer,O as useRef,P as useState,I as version};
3
3
  //# sourceMappingURL=react.production.min.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"react.production.min.js","sources":["../../../../node_modules/react/cjs/react.production.min.js","../../../../node_modules/react/index.js","../../src/export-externals/exportReact.js"],"sourcesContent":["/**\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","'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","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 useCallback,\n useContext,\n useDebugValue,\n useEffect,\n useImperativeHandle,\n useLayoutEffect,\n useMemo,\n useReducer,\n useRef,\n useState,\n version\n} = React;\n"],"names":["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","useT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kE,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,2DCtBjFC,QAAiBC,eCCP,MAACC,GAAc,GACd7C,SACXA,EAAQE,WACRA,EAAUD,SACVA,EAAQ6C,SACRA,EAAQtD,SACRA,EAAQO,UACRA,EAASgD,cACTA,EAAa3C,aACbA,EAAYC,cACZA,EAAaS,cACbA,EAAakC,cACbA,EAAahC,UACbA,EAASC,WACTA,EAAUE,eACVA,EAAcC,KACdA,EAAIG,KACJA,EAAII,YACJA,EAAWC,WACXA,EAAUC,cACVA,EAAaE,UACbA,EAASE,oBACTA,EAAmBE,gBACnBA,EAAeC,QACfA,EAAOC,WACPA,EAAUC,OACVA,EAAMC,SACNA,EAAQG,QACRA,GACEO","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/exportReact.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 useCallback,\n useContext,\n useDebugValue,\n useEffect,\n useImperativeHandle,\n useLayoutEffect,\n useMemo,\n useReducer,\n useRef,\n useState,\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,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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C,gBAAC,SAASvH,EAAEC,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,EAAII,YACJA,EAAWC,WACXA,EAAUC,cACVA,EAAaE,UACbA,EAASE,oBACTA,EAAmBE,gBACnBA,EAAeC,QACfA,EAAOC,WACPA,EAAUC,OACVA,EAAMC,SACNA,EAAQG,QACRA,GACEM","x_google_ignoreList":[0,1]}
@@ -1,4 +1,9 @@
1
1
  import { PluginOption } from "vite";
2
+ export declare enum ApplicationBundleType {
3
+ APP = "app",
4
+ BUNDLE = "bundle"
5
+ }
6
+ type ApplicationBundleTypeKey = `${ApplicationBundleType}`;
2
7
  interface AppShellVitePluginOptions {
3
8
  /**
4
9
  * Project root directory. Most likely location of the vite config file.
@@ -17,6 +22,15 @@ interface AppShellVitePluginOptions {
17
22
  * @default false
18
23
  */
19
24
  externalImportMap?: boolean;
25
+ /**
26
+ * Type of application bundle being built. Can be "app" or "bundle".
27
+ *
28
+ * - "app": The application bundle includes both the index.html entry point and the exported modules.
29
+ * - "bundle": The application bundle will not include the index.html entry point.
30
+ *
31
+ * @default "app"
32
+ */
33
+ type?: ApplicationBundleTypeKey;
20
34
  }
21
35
  /**
22
36
  * Vite plugin to support App Shell apps setup
@@ -1 +1 @@
1
- {"version":3,"file":"vite-plugin.d.ts","sourceRoot":"","sources":["../src/vite-plugin.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAc,MAAM,MAAM,CAAC;AA8QhD,UAAU,yBAAyB;IACjC;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,GAAE,yBAA8B,GACnC,YAAY,CAyJd;AAED,eAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"vite-plugin.d.ts","sourceRoot":"","sources":["../src/vite-plugin.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAc,MAAM,MAAM,CAAC;AAsRhD,oBAAY,qBAAqB;IAC/B,GAAG,QAAQ;IACX,MAAM,WAAW;CAClB;AAED,KAAK,wBAAwB,GAAG,GAAG,qBAAqB,EAAE,CAAC;AAE3D,UAAU,yBAAyB;IACjC;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,wBAAwB,CAAC;CACjC;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,GAAE,yBAA8B,GACnC,YAAY,CAuKd;AAED,eAAe,kBAAkB,CAAC"}
@@ -107,10 +107,10 @@ function getAppModules(root, appShellConfig) {
107
107
  * @param root Project root directory.
108
108
  * @param appShellConfig The original App Shell configuration json.
109
109
  * @param selfAppName The name of the application bundle being built.
110
+ * @param buildEntryPoint If true, the index.html entry point will be added to the bundle.
110
111
  */
111
- function processConfiguration(root, appShellConfig, selfAppName) {
112
- const finalAppShellConfig = { ...appShellConfig };
113
- const selfApp = getMainApp(finalAppShellConfig);
112
+ function processConfiguration(root, appShellConfig, selfAppName, buildEntryPoint) {
113
+ const selfApp = getMainApp(appShellConfig);
114
114
  return {
115
115
  name: "vite-plugin-appShell-configuration-processor",
116
116
  config(config, { command }) {
@@ -121,7 +121,10 @@ function processConfiguration(root, appShellConfig, selfAppName) {
121
121
  rollupOptions: {
122
122
  preserveEntrySignatures: "strict",
123
123
  input: {
124
- main: path.resolve(projectRoot, "index.html"),
124
+ ...(buildEntryPoint &&
125
+ fs.existsSync(path.resolve(projectRoot, "index.html"))
126
+ ? { main: path.resolve(projectRoot, "index.html") }
127
+ : {}),
125
128
  ...getAppModules(projectRoot, appShellConfig)
126
129
  },
127
130
  output: {
@@ -194,6 +197,9 @@ function processConfiguration(root, appShellConfig, selfAppName) {
194
197
  // replace references to @self with the name of this application bundle
195
198
  selfApp.id = selfAppName;
196
199
  }
200
+ const finalAppShellConfig = buildEntryPoint
201
+ ? { ...appShellConfig }
202
+ : { name: appShellConfig.name, apps: [selfApp] };
197
203
  fs.writeFileSync(path.resolve(targetDir, "app-shell.config.json"), JSON.stringify(finalAppShellConfig));
198
204
  }
199
205
  };
@@ -223,6 +229,11 @@ const generateBaseTag = (appShellConfig) => {
223
229
  }
224
230
  };
225
231
  };
232
+ export var ApplicationBundleType;
233
+ (function (ApplicationBundleType) {
234
+ ApplicationBundleType["APP"] = "app";
235
+ ApplicationBundleType["BUNDLE"] = "bundle";
236
+ })(ApplicationBundleType || (ApplicationBundleType = {}));
226
237
  /**
227
238
  * Vite plugin to support App Shell apps setup
228
239
  * @param opts Plugin options
@@ -230,6 +241,9 @@ const generateBaseTag = (appShellConfig) => {
230
241
  export function appShellVitePlugin(opts = {}) {
231
242
  const root = opts.root || process.cwd();
232
243
  const mode = opts.mode || ViteBuildMode.PRODUCTION;
244
+ const externalImportMap = opts.externalImportMap || false;
245
+ const type = opts.type ?? ApplicationBundleType.APP;
246
+ const buildEntryPoint = type !== ApplicationBundleType.BUNDLE;
233
247
  console.info(`Vite running in mode: ${mode}`);
234
248
  const devMode = mode === ViteBuildMode.DEVELOPMENT;
235
249
  const packageJsonRaw = fs.readFileSync(path.resolve(root, "package.json"), "utf-8");
@@ -238,33 +252,34 @@ export function appShellVitePlugin(opts = {}) {
238
252
  const appShellConfiguration = JSON.parse(appShellConfigRaw);
239
253
  return [
240
254
  // Copy all the required js bundles to final "bundles" folders, that will be injected by the importmap
241
- viteStaticCopy({
242
- targets: [
243
- {
244
- src: getModulePath("es-module-shims", "dist/*"),
245
- dest: "bundles"
246
- },
247
- ...(!devMode
248
- ? [
249
- {
250
- src: [
251
- resolveModule("./esm-externals/react.production.min.js"),
252
- resolveModule("./esm-externals/react.production.min.js.map"),
253
- resolveModule("./esm-externals/react-dom.production.min.js"),
254
- resolveModule("./esm-externals/react-dom.production.min.js.map"),
255
- resolveModule("./esm-externals/react-router-dom.production.min.js"),
256
- resolveModule("./esm-externals/react-router-dom.production.min.js.map"),
257
- resolveModule("@hitachivantara/app-shell-shared/bundles/app-shell-shared.esm.js"),
258
- resolveModule("@hitachivantara/app-shell-shared/bundles/app-shell-shared.esm.js.map"),
259
- resolveModule("@hitachivantara/uikit-react-shared/bundles/uikit-react-shared.esm.js"),
260
- resolveModule("@hitachivantara/uikit-react-shared/bundles/uikit-react-shared.esm.js.map")
261
- ],
262
- dest: "bundles"
263
- }
264
- ]
265
- : [])
266
- ]
267
- }),
255
+ (buildEntryPoint || devMode) &&
256
+ viteStaticCopy({
257
+ targets: [
258
+ {
259
+ src: getModulePath("es-module-shims", "dist/*"),
260
+ dest: "bundles"
261
+ },
262
+ ...(!devMode && buildEntryPoint
263
+ ? [
264
+ {
265
+ src: [
266
+ resolveModule("./esm-externals/react.production.min.js"),
267
+ resolveModule("./esm-externals/react.production.min.js.map"),
268
+ resolveModule("./esm-externals/react-dom.production.min.js"),
269
+ resolveModule("./esm-externals/react-dom.production.min.js.map"),
270
+ resolveModule("./esm-externals/react-router-dom.production.min.js"),
271
+ resolveModule("./esm-externals/react-router-dom.production.min.js.map"),
272
+ resolveModule("@hitachivantara/app-shell-shared/bundles/app-shell-shared.esm.js"),
273
+ resolveModule("@hitachivantara/app-shell-shared/bundles/app-shell-shared.esm.js.map"),
274
+ resolveModule("@hitachivantara/uikit-react-shared/bundles/uikit-react-shared.esm.js"),
275
+ resolveModule("@hitachivantara/uikit-react-shared/bundles/uikit-react-shared.esm.js.map")
276
+ ],
277
+ dest: "bundles"
278
+ }
279
+ ]
280
+ : [])
281
+ ]
282
+ }),
268
283
  // create virtual endpoints to support dev mode
269
284
  virtual({
270
285
  "/bundles/react.production.min.js": `import * as React from "react";
@@ -342,10 +357,10 @@ export function appShellVitePlugin(opts = {}) {
342
357
  "@hitachivantara/uikit-react-shared",
343
358
  "@self",
344
359
  packageJson.name
345
- ], opts.externalImportMap),
346
- generateBaseTag(appShellConfiguration),
360
+ ], externalImportMap && buildEntryPoint),
361
+ buildEntryPoint && generateBaseTag(appShellConfiguration),
347
362
  // process configuration
348
- processConfiguration(root, appShellConfiguration, packageJson.name)
363
+ processConfiguration(root, appShellConfiguration, packageJson.name, buildEntryPoint)
349
364
  ];
350
365
  }
351
366
  export default appShellVitePlugin;
@@ -1 +1 @@
1
- {"version":3,"file":"vite-plugin.js","sourceRoot":"","sources":["../src/vite-plugin.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,wBAAwB,CAAC;AAE7C,OAAO,EAAE,MAAM,IAA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,CAAC;AACJ,CAAC;AAED,eAAe,kBAAkB,CAAC","sourcesContent":["import { NormalizedOutputOptions, OutputBundle } from \"rollup\";\nimport virtual from \"@rollup/plugin-virtual\";\n\nimport fs from \"fs\";\nimport path from \"path\";\n\nimport { viteStaticCopy } from \"vite-plugin-static-copy\";\nimport { PluginOption, UserConfig } from \"vite\";\n\nimport { createRequire } from \"node:module\";\nimport {\n HvAppShellAppsConfig,\n HvAppShellConfig\n} from \"@hitachivantara/app-shell-shared\";\nimport generateImportmap from \"./vite-importmap-plugin.js\";\n\nconst require = createRequire(import.meta.url);\n\n/**\n * Return the main app (identified by @self)\n * @param appShellConfig The App shell configuration\n */\nconst getMainApp = (\n appShellConfig: HvAppShellConfig\n): HvAppShellAppsConfig | undefined => {\n return appShellConfig.apps.filter(app => app.id === \"@self\")[0];\n};\n\n/**\n * Return the public path to be use by vite to launch the application.\n * Value is obtained by returning the baseUrl value of the main app {@link #getMainApp}\n * @param appShellConfig The App shell configuration\n */\nconst getPublicPath = (appShellConfig: HvAppShellConfig): string => {\n const mainApp = getMainApp(appShellConfig);\n if (!mainApp) {\n return \"/\";\n }\n const url = mainApp.baseUrl;\n try {\n return new URL(url).pathname;\n } catch {\n return url;\n }\n};\n\n/**\n * Resolves the module name and normalizes slashes to be posix/unix-like forward slashes.\n *\n * @param moduleName The name of the module to be searched for\n * @returns The module path normalized\n */\nfunction resolveModule(moduleName: string) {\n const module = require.resolve(moduleName);\n return module.replace(/\\\\+/g, \"/\");\n}\n\n/**\n * This function will find out the module path using node `require.resolve` function\n * and add the suffix param after the folder with module name.\n *\n * @param moduleName \"@module/name\"\n * @param suffix to be added after the module path\n * @returns the /path/to/@module/name/<suffix>\n */\nfunction getModulePath(moduleName: string, suffix: string) {\n const moduleNameWithSlashes = `/${moduleName}/`;\n const module = resolveModule(moduleName);\n const modulePosition = module.lastIndexOf(moduleNameWithSlashes);\n return `${module.slice(\n 0,\n modulePosition + moduleNameWithSlashes.length\n )}${suffix}`;\n}\n\nenum ViteBuildMode {\n PRODUCTION = \"production\",\n DEVELOPMENT = \"development\"\n}\n\nenum ViteCommand {\n BUILD = \"build\",\n SERVE = \"serve\"\n}\n\n/**\n * Returns the modules to be created by the build of the app.\n * The list of modules is defined by the app-shell-config.json file routes ( limited to the @self app)\n * The bundles will be created following the original directories structure ( having the src folder path removed)\n *\n * @param root Project root directory.\n * @param appShellConfig The App Shell configuration.\n */\nfunction getAppModules(root: string, appShellConfig: HvAppShellConfig) {\n const appModules: { [key: string]: string } = {};\n\n const selfApp = getMainApp(appShellConfig);\n const selfViews =\n selfApp?.views?.map(view => {\n const bundleName = view.bundle.replace(/^src\\//, \"\");\n return {\n ...view,\n bundleName\n };\n }) ?? [];\n\n selfViews.forEach(view => {\n appModules[view.bundleName] = path.resolve(root, view.bundle);\n });\n\n const selfModules =\n selfApp?.modules?.map(module => {\n const bundleName = module.bundle.replace(/^src\\//, \"\");\n return {\n ...module,\n bundleName\n };\n }) ?? [];\n\n selfModules.forEach(module => {\n appModules[module.bundleName] = path.resolve(root, module.bundle);\n });\n\n console.info(\"Modules exported by the application bundle:\", appModules);\n return appModules;\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 * - Injects the APP_BASE_PATH env prop, to be used by the apps (if required)\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 */\nfunction processConfiguration(\n root: string,\n appShellConfig: HvAppShellConfig,\n selfAppName: string\n): PluginOption {\n const finalAppShellConfig = { ...appShellConfig };\n const selfApp = getMainApp(finalAppShellConfig);\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 return {\n build: {\n rollupOptions: {\n preserveEntrySignatures: \"strict\",\n input: {\n main: path.resolve(projectRoot, \"index.html\"),\n ...getAppModules(projectRoot, appShellConfig)\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 define: {\n ...config.define,\n APP_BASE_PATH: JSON.stringify(publicPath)\n }\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 // 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=chunck 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.replace(/^src\\//, \"\");\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\n fs.writeFileSync(\n path.resolve(targetDir, \"app-shell.config.json\"),\n JSON.stringify(finalAppShellConfig)\n );\n }\n };\n}\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 */\nconst generateBaseTag = (appShellConfig: HvAppShellConfig): PluginOption => {\n const publicPath = getPublicPath(appShellConfig);\n return {\n name: \"vite-plugin-generate-base\",\n enforce: \"pre\",\n // except for react and react-dom when in dev mode\n transformIndexHtml: {\n enforce: \"post\",\n transform: (html: string) => ({\n html,\n tags: [\n {\n tag: \"base\",\n attrs: { href: publicPath },\n injectTo: \"head-prepend\"\n }\n ]\n })\n }\n };\n};\n\ninterface AppShellVitePluginOptions {\n /**\n * Project root directory. Most likely location of the vite config file.\n *\n * @default process.cwd()\n */\n root?: string;\n /**\n * Execution mode.\n */\n mode?: string;\n /**\n * If true, the plugin will generate the importmap with an external js file instead of inline in the html.\n * The map will be saved at the root of the application destination dir and named as \"importmap.js\"\n *\n * @default false\n */\n externalImportMap?: boolean;\n}\n\n/**\n * Vite plugin to support App Shell apps setup\n * @param opts Plugin options\n */\nexport function appShellVitePlugin(\n opts: AppShellVitePluginOptions = {}\n): PluginOption {\n const root = opts.root || process.cwd();\n const mode = opts.mode || ViteBuildMode.PRODUCTION;\n\n console.info(`Vite running in mode: ${mode}`);\n\n const devMode = mode === ViteBuildMode.DEVELOPMENT;\n\n const packageJsonRaw = fs.readFileSync(\n path.resolve(root, \"package.json\"),\n \"utf-8\"\n );\n const packageJson = JSON.parse(packageJsonRaw);\n\n const appShellConfigRaw = fs.readFileSync(\n path.resolve(root, \"app-shell.config.json\"),\n \"utf-8\"\n );\n const appShellConfiguration = JSON.parse(\n appShellConfigRaw\n ) as HvAppShellConfig;\n\n return [\n // Copy all the required js bundles to final \"bundles\" folders, that will be injected by the importmap\n viteStaticCopy({\n targets: [\n {\n src: getModulePath(\"es-module-shims\", \"dist/*\"),\n dest: \"bundles\"\n },\n ...(!devMode\n ? [\n {\n src: [\n resolveModule(\"./esm-externals/react.production.min.js\"),\n resolveModule(\"./esm-externals/react.production.min.js.map\"),\n resolveModule(\"./esm-externals/react-dom.production.min.js\"),\n resolveModule(\n \"./esm-externals/react-dom.production.min.js.map\"\n ),\n resolveModule(\n \"./esm-externals/react-router-dom.production.min.js\"\n ),\n resolveModule(\n \"./esm-externals/react-router-dom.production.min.js.map\"\n ),\n resolveModule(\n \"@hitachivantara/app-shell-shared/bundles/app-shell-shared.esm.js\"\n ),\n resolveModule(\n \"@hitachivantara/app-shell-shared/bundles/app-shell-shared.esm.js.map\"\n ),\n resolveModule(\n \"@hitachivantara/uikit-react-shared/bundles/uikit-react-shared.esm.js\"\n ),\n resolveModule(\n \"@hitachivantara/uikit-react-shared/bundles/uikit-react-shared.esm.js.map\"\n )\n ],\n dest: \"bundles\"\n }\n ]\n : [])\n ]\n }),\n\n // create virtual endpoints to support dev mode\n virtual({\n \"/bundles/react.production.min.js\": `import * as React from \"react\";\n export default React;\n\n export {\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 useCallback,\n useContext,\n useDebugValue,\n useEffect,\n useImperativeHandle,\n useLayoutEffect,\n useMemo,\n useReducer,\n useRef,\n useState,\n version,\n } from \"react\";`,\n \"/bundles/react-dom.production.min.js\": `export {\n default,\n flushSync,\n createPortal,\n findDOMNode,\n hydrate,\n render,\n unmountComponentAtNode,\n unstable_batchedUpdates,\n unstable_renderSubtreeIntoContainer,\n version,\n } from \"react-dom\";`,\n \"/bundles/react-router-dom.production.min.js\": `export * from \"react-router-dom\";`,\n \"/bundles/app-shell-shared.esm.js\": `export * from \"@hitachivantara/app-shell-shared\";`,\n \"/bundles/uikit-react-shared.esm.js\": `export * from \"@hitachivantara/uikit-react-shared\";`\n }),\n\n // generation of the importmap to create the link to the js bundles\n generateImportmap(\n {\n react: `./bundles/react.production.min.js`,\n \"react-dom\": `./bundles/react-dom.production.min.js`,\n \"react-router-dom\": `./bundles/react-router-dom.production.min.js`,\n \"@hitachivantara/app-shell-shared\": \"./bundles/app-shell-shared.esm.js\",\n \"@hitachivantara/uikit-react-shared\":\n \"./bundles/uikit-react-shared.esm.js\",\n ...appShellConfiguration?.apps?.reduce((acc, app) => {\n if (app.id === \"@self\") {\n acc[`${packageJson.name}/`] = app.baseUrl;\n if (devMode) {\n acc[`${app.id}/`] = app.baseUrl;\n }\n } else {\n acc[`${app.id}/`] = app.baseUrl;\n }\n return acc;\n }, {} as Record<string, string>)\n },\n [\n \"react\",\n \"react-dom\",\n \"react-router-dom\",\n \"@hitachivantara/app-shell-shared\",\n \"@hitachivantara/uikit-react-shared\",\n \"@self\",\n packageJson.name\n ],\n opts.externalImportMap\n ),\n generateBaseTag(appShellConfiguration),\n // process configuration\n processConfiguration(root, appShellConfiguration, packageJson.name)\n ];\n}\n\nexport default appShellVitePlugin;\n"]}
1
+ {"version":3,"file":"vite-plugin.js","sourceRoot":"","sources":["../src/vite-plugin.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,wBAAwB,CAAC;AAE7C,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAGzD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAK5C,OAAO,iBAAiB,MAAM,4BAA4B,CAAC;AAE3D,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAE/C;;;GAGG;AACH,MAAM,UAAU,GAAG,CACjB,cAAgC,EACE,EAAE;IACpC,OAAO,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AAClE,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,aAAa,GAAG,CAAC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,CAAC,IAAI;SACjB,EACD,iBAAiB,IAAI,eAAe,CACrC;QACD,eAAe,IAAI,eAAe,CAAC,qBAAqB,CAAC;QACzD,wBAAwB;QACxB,oBAAoB,CAClB,IAAI,EACJ,qBAAqB,EACrB,WAAW,CAAC,IAAI,EAChB,eAAe,CAChB;KACF,CAAC;AACJ,CAAC;AAED,eAAe,kBAAkB,CAAC","sourcesContent":["import { NormalizedOutputOptions, OutputBundle } from \"rollup\";\nimport virtual from \"@rollup/plugin-virtual\";\n\nimport fs from \"fs\";\nimport path from \"path\";\n\nimport { viteStaticCopy } from \"vite-plugin-static-copy\";\nimport { PluginOption, UserConfig } from \"vite\";\n\nimport { createRequire } from \"node:module\";\nimport {\n HvAppShellAppsConfig,\n HvAppShellConfig\n} from \"@hitachivantara/app-shell-shared\";\nimport generateImportmap from \"./vite-importmap-plugin.js\";\n\nconst require = createRequire(import.meta.url);\n\n/**\n * Return the main app (identified by @self)\n * @param appShellConfig The App shell configuration\n */\nconst getMainApp = (\n appShellConfig: HvAppShellConfig\n): HvAppShellAppsConfig | undefined => {\n return appShellConfig.apps.filter(app => app.id === \"@self\")[0];\n};\n\n/**\n * Return the public path to be use by vite to launch the application.\n * Value is obtained by returning the baseUrl value of the main app {@link #getMainApp}\n * @param appShellConfig The App shell configuration\n */\nconst getPublicPath = (appShellConfig: HvAppShellConfig): string => {\n const mainApp = getMainApp(appShellConfig);\n if (!mainApp) {\n return \"/\";\n }\n const url = mainApp.baseUrl;\n try {\n return new URL(url).pathname;\n } catch {\n return url;\n }\n};\n\n/**\n * Resolves the module name and normalizes slashes to be posix/unix-like forward slashes.\n *\n * @param moduleName The name of the module to be searched for\n * @returns The module path normalized\n */\nfunction resolveModule(moduleName: string) {\n const module = require.resolve(moduleName);\n return module.replace(/\\\\+/g, \"/\");\n}\n\n/**\n * This function will find out the module path using node `require.resolve` function\n * and add the suffix param after the folder with module name.\n *\n * @param moduleName \"@module/name\"\n * @param suffix to be added after the module path\n * @returns the /path/to/@module/name/<suffix>\n */\nfunction getModulePath(moduleName: string, suffix: string) {\n const moduleNameWithSlashes = `/${moduleName}/`;\n const module = resolveModule(moduleName);\n const modulePosition = module.lastIndexOf(moduleNameWithSlashes);\n return `${module.slice(\n 0,\n modulePosition + moduleNameWithSlashes.length\n )}${suffix}`;\n}\n\nenum ViteBuildMode {\n PRODUCTION = \"production\",\n DEVELOPMENT = \"development\"\n}\n\nenum ViteCommand {\n BUILD = \"build\",\n SERVE = \"serve\"\n}\n\n/**\n * Returns the modules to be created by the build of the app.\n * The list of modules is defined by the app-shell-config.json file routes ( limited to the @self app)\n * The bundles will be created following the original directories structure ( having the src folder path removed)\n *\n * @param root Project root directory.\n * @param appShellConfig The App Shell configuration.\n */\nfunction getAppModules(root: string, appShellConfig: HvAppShellConfig) {\n const appModules: { [key: string]: string } = {};\n\n const selfApp = getMainApp(appShellConfig);\n const selfViews =\n selfApp?.views?.map(view => {\n const bundleName = view.bundle.replace(/^src\\//, \"\");\n return {\n ...view,\n bundleName\n };\n }) ?? [];\n\n selfViews.forEach(view => {\n appModules[view.bundleName] = path.resolve(root, view.bundle);\n });\n\n const selfModules =\n selfApp?.modules?.map(module => {\n const bundleName = module.bundle.replace(/^src\\//, \"\");\n return {\n ...module,\n bundleName\n };\n }) ?? [];\n\n selfModules.forEach(module => {\n appModules[module.bundleName] = path.resolve(root, module.bundle);\n });\n\n console.info(\"Modules exported by the application bundle:\", appModules);\n return appModules;\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 * - Injects the APP_BASE_PATH env prop, to be used by the apps (if required)\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 */\nfunction processConfiguration(\n root: string,\n appShellConfig: HvAppShellConfig,\n selfAppName: string,\n buildEntryPoint: boolean\n): PluginOption {\n const selfApp = getMainApp(appShellConfig);\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 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 ...getAppModules(projectRoot, appShellConfig)\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 define: {\n ...config.define,\n APP_BASE_PATH: JSON.stringify(publicPath)\n }\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 // 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=chunck 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.replace(/^src\\//, \"\");\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\n const finalAppShellConfig = buildEntryPoint\n ? { ...appShellConfig }\n : { name: appShellConfig.name, apps: [selfApp] };\n\n fs.writeFileSync(\n path.resolve(targetDir, \"app-shell.config.json\"),\n JSON.stringify(finalAppShellConfig)\n );\n }\n };\n}\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 */\nconst generateBaseTag = (appShellConfig: HvAppShellConfig): PluginOption => {\n const publicPath = getPublicPath(appShellConfig);\n return {\n name: \"vite-plugin-generate-base\",\n enforce: \"pre\",\n // except for react and react-dom when in dev mode\n transformIndexHtml: {\n enforce: \"post\",\n transform: (html: string) => ({\n html,\n tags: [\n {\n tag: \"base\",\n attrs: { href: publicPath },\n injectTo: \"head-prepend\"\n }\n ]\n })\n }\n };\n};\n\nexport enum ApplicationBundleType {\n APP = \"app\",\n BUNDLE = \"bundle\"\n}\n\ntype ApplicationBundleTypeKey = `${ApplicationBundleType}`;\n\ninterface AppShellVitePluginOptions {\n /**\n * Project root directory. Most likely location of the vite config file.\n *\n * @default process.cwd()\n */\n root?: string;\n /**\n * Execution mode.\n */\n mode?: string;\n /**\n * If true, the plugin will generate the importmap with an external js file instead of inline in the html.\n * The map will be saved at the root of the application destination dir and named as \"importmap.js\"\n *\n * @default false\n */\n externalImportMap?: boolean;\n\n /**\n * Type of application bundle being built. Can be \"app\" or \"bundle\".\n *\n * - \"app\": The application bundle includes both the index.html entry point and the exported modules.\n * - \"bundle\": The application bundle will not include the index.html entry point.\n *\n * @default \"app\"\n */\n type?: ApplicationBundleTypeKey;\n}\n\n/**\n * Vite plugin to support App Shell apps setup\n * @param opts Plugin options\n */\nexport function appShellVitePlugin(\n opts: AppShellVitePluginOptions = {}\n): PluginOption {\n const root = opts.root || process.cwd();\n const mode = opts.mode || ViteBuildMode.PRODUCTION;\n const externalImportMap = opts.externalImportMap || false;\n const type = opts.type ?? ApplicationBundleType.APP;\n\n const buildEntryPoint = type !== ApplicationBundleType.BUNDLE;\n\n console.info(`Vite running in mode: ${mode}`);\n\n const devMode = mode === ViteBuildMode.DEVELOPMENT;\n\n const packageJsonRaw = fs.readFileSync(\n path.resolve(root, \"package.json\"),\n \"utf-8\"\n );\n const packageJson = JSON.parse(packageJsonRaw);\n\n const appShellConfigRaw = fs.readFileSync(\n path.resolve(root, \"app-shell.config.json\"),\n \"utf-8\"\n );\n const appShellConfiguration = JSON.parse(\n appShellConfigRaw\n ) as HvAppShellConfig;\n\n return [\n // Copy all the required js bundles to final \"bundles\" folders, that will be injected by the importmap\n (buildEntryPoint || devMode) &&\n viteStaticCopy({\n targets: [\n {\n src: getModulePath(\"es-module-shims\", \"dist/*\"),\n dest: \"bundles\"\n },\n ...(!devMode && buildEntryPoint\n ? [\n {\n src: [\n resolveModule(\"./esm-externals/react.production.min.js\"),\n resolveModule(\n \"./esm-externals/react.production.min.js.map\"\n ),\n resolveModule(\n \"./esm-externals/react-dom.production.min.js\"\n ),\n resolveModule(\n \"./esm-externals/react-dom.production.min.js.map\"\n ),\n resolveModule(\n \"./esm-externals/react-router-dom.production.min.js\"\n ),\n resolveModule(\n \"./esm-externals/react-router-dom.production.min.js.map\"\n ),\n resolveModule(\n \"@hitachivantara/app-shell-shared/bundles/app-shell-shared.esm.js\"\n ),\n resolveModule(\n \"@hitachivantara/app-shell-shared/bundles/app-shell-shared.esm.js.map\"\n ),\n resolveModule(\n \"@hitachivantara/uikit-react-shared/bundles/uikit-react-shared.esm.js\"\n ),\n resolveModule(\n \"@hitachivantara/uikit-react-shared/bundles/uikit-react-shared.esm.js.map\"\n )\n ],\n dest: \"bundles\"\n }\n ]\n : [])\n ]\n }),\n\n // create virtual endpoints to support dev mode\n virtual({\n \"/bundles/react.production.min.js\": `import * as React from \"react\";\n export default React;\n\n export {\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 useCallback,\n useContext,\n useDebugValue,\n useEffect,\n useImperativeHandle,\n useLayoutEffect,\n useMemo,\n useReducer,\n useRef,\n useState,\n version,\n } from \"react\";`,\n \"/bundles/react-dom.production.min.js\": `export {\n default,\n flushSync,\n createPortal,\n findDOMNode,\n hydrate,\n render,\n unmountComponentAtNode,\n unstable_batchedUpdates,\n unstable_renderSubtreeIntoContainer,\n version,\n } from \"react-dom\";`,\n \"/bundles/react-router-dom.production.min.js\": `export * from \"react-router-dom\";`,\n \"/bundles/app-shell-shared.esm.js\": `export * from \"@hitachivantara/app-shell-shared\";`,\n \"/bundles/uikit-react-shared.esm.js\": `export * from \"@hitachivantara/uikit-react-shared\";`\n }),\n\n // generation of the importmap to create the link to the js bundles\n generateImportmap(\n {\n react: `./bundles/react.production.min.js`,\n \"react-dom\": `./bundles/react-dom.production.min.js`,\n \"react-router-dom\": `./bundles/react-router-dom.production.min.js`,\n \"@hitachivantara/app-shell-shared\": \"./bundles/app-shell-shared.esm.js\",\n \"@hitachivantara/uikit-react-shared\":\n \"./bundles/uikit-react-shared.esm.js\",\n ...appShellConfiguration?.apps?.reduce((acc, app) => {\n if (app.id === \"@self\") {\n acc[`${packageJson.name}/`] = app.baseUrl;\n if (devMode) {\n acc[`${app.id}/`] = app.baseUrl;\n }\n } else {\n acc[`${app.id}/`] = app.baseUrl;\n }\n return acc;\n }, {} as Record<string, string>)\n },\n [\n \"react\",\n \"react-dom\",\n \"react-router-dom\",\n \"@hitachivantara/app-shell-shared\",\n \"@hitachivantara/uikit-react-shared\",\n \"@self\",\n packageJson.name\n ],\n externalImportMap && buildEntryPoint\n ),\n buildEntryPoint && generateBaseTag(appShellConfiguration),\n // process configuration\n processConfiguration(\n root,\n appShellConfiguration,\n packageJson.name,\n buildEntryPoint\n )\n ];\n}\n\nexport default appShellVitePlugin;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hitachivantara/app-shell-vite-plugin",
3
- "version": "0.5.1",
3
+ "version": "0.6.1",
4
4
  "description": "AppShell Vite Plugin",
5
5
  "author": "Hitachi Vantara - Boba Fett Team",
6
6
  "type": "module",
@@ -32,7 +32,7 @@
32
32
  "lint:prettier": "npx prettier --write \"src/**/*.{html,css,js,jsx,ts,tsx}\""
33
33
  },
34
34
  "dependencies": {
35
- "@hitachivantara/app-shell-shared": "0.5.1",
35
+ "@hitachivantara/app-shell-shared": "0.5.2",
36
36
  "@rollup/plugin-commonjs": "^24.0.0",
37
37
  "@rollup/plugin-json": "^6.0.0",
38
38
  "@rollup/plugin-node-resolve": "^15.0.1",
@@ -52,5 +52,5 @@
52
52
  "@types/react-dom": "^18.0.11",
53
53
  "tsc-watch": "^6.0.0"
54
54
  },
55
- "gitHead": "904a0e52b3728c0b962acc3af79dc1ffd090836e"
55
+ "gitHead": "f5b844576cb8b11a8fb5a5139c7b11c7a12a04a1"
56
56
  }