@flarehr/superhero-benefits-onboarding 0.9.8 → 0.10.9

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.
@@ -0,0 +1 @@
1
+ (()=>{"use strict";var e,t,n,_,o,r={},l=[],i=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function u(e,t){for(var n in t)e[n]=t[n];return e}function s(e){var t=e.parentNode;t&&t.removeChild(e)}function c(t,n,_){var o,r,l,i={};for(l in n)"key"==l?o=n[l]:"ref"==l?r=n[l]:i[l]=n[l];if(arguments.length>2&&(i.children=arguments.length>3?e.call(arguments,2):_),"function"==typeof t&&null!=t.defaultProps)for(l in t.defaultProps)void 0===i[l]&&(i[l]=t.defaultProps[l]);return f(t,i,o,r,null)}function f(e,_,o,r,l){var i={type:e,props:_,key:o,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==l?++n:l};return null==l&&null!=t.vnode&&t.vnode(i),i}function p(e){return e.children}function a(e,t){this.props=e,this.context=t}function d(e,t){if(null==t)return e.__?d(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?d(e):null}function h(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return h(e)}}function v(e){(!e.__d&&(e.__d=!0)&&_.push(e)&&!y.__r++||o!==t.debounceRendering)&&((o=t.debounceRendering)||setTimeout)(y)}function y(){for(var e;y.__r=_.length;)e=_.sort((function(e,t){return e.__v.__b-t.__v.__b})),_=[],e.some((function(e){var t,n,_,o,r,l;e.__d&&(r=(o=(t=e).__v).__e,(l=t.__P)&&(n=[],(_=u({},o)).__v=o.__v+1,E(l,o,_,t.__n,void 0!==l.ownerSVGElement,null!=o.__h?[r]:null,n,null==r?d(o):r,o.__h),S(n,o),o.__e!=r&&h(o)))}))}function m(e,t,n,_,o,i,u,s,c,a){var h,v,y,m,k,C,x,w=_&&_.__k||l,S=w.length;for(n.__k=[],h=0;h<t.length;h++)if(null!=(m=n.__k[h]=null==(m=t[h])||"boolean"==typeof m?null:"string"==typeof m||"number"==typeof m||"bigint"==typeof m?f(null,m,null,null,m):Array.isArray(m)?f(p,{children:m},null,null,null):m.__b>0?f(m.type,m.props,m.key,null,m.__v):m)){if(m.__=n,m.__b=n.__b+1,null===(y=w[h])||y&&m.key==y.key&&m.type===y.type)w[h]=void 0;else for(v=0;v<S;v++){if((y=w[v])&&m.key==y.key&&m.type===y.type){w[v]=void 0;break}y=null}E(e,m,y=y||r,o,i,u,s,c,a),k=m.__e,(v=m.ref)&&y.ref!=v&&(x||(x=[]),y.ref&&x.push(y.ref,null,m),x.push(v,m.__c||k,m)),null!=k?(null==C&&(C=k),"function"==typeof m.type&&m.__k===y.__k?m.__d=c=b(m,c,e):c=g(e,m,y,w,k,c),"function"==typeof n.type&&(n.__d=c)):c&&y.__e==c&&c.parentNode!=e&&(c=d(y))}for(n.__e=C,h=S;h--;)null!=w[h]&&("function"==typeof n.type&&null!=w[h].__e&&w[h].__e==n.__d&&(n.__d=d(_,h+1)),L(w[h],w[h]));if(x)for(h=0;h<x.length;h++)T(x[h],x[++h],x[++h])}function b(e,t,n){for(var _,o=e.__k,r=0;o&&r<o.length;r++)(_=o[r])&&(_.__=e,t="function"==typeof _.type?b(_,t,n):g(n,_,_,o,_.__e,t));return t}function g(e,t,n,_,o,r){var l,i,u;if(void 0!==t.__d)l=t.__d,t.__d=void 0;else if(null==n||o!=r||null==o.parentNode)e:if(null==r||r.parentNode!==e)e.appendChild(o),l=null;else{for(i=r,u=0;(i=i.nextSibling)&&u<_.length;u+=2)if(i==o)break e;e.insertBefore(o,r),l=r}return void 0!==l?l:o.nextSibling}function k(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]=null==n?"":"number"!=typeof n||i.test(t)?n:n+"px"}function C(e,t,n,_,o){var r;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof _&&(e.style.cssText=_=""),_)for(t in _)n&&t in n||k(e.style,t,"");if(n)for(t in n)_&&n[t]===_[t]||k(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])r=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+r]=n,n?_||e.addEventListener(t,r?w:x,r):e.removeEventListener(t,r?w:x,r);else if("dangerouslySetInnerHTML"!==t){if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null!=n&&(!1!==n||"a"===t[0]&&"r"===t[1])?e.setAttribute(t,n):e.removeAttribute(t))}}function x(e){this.l[e.type+!1](t.event?t.event(e):e)}function w(e){this.l[e.type+!0](t.event?t.event(e):e)}function E(e,n,_,o,r,l,i,s,c){var f,d,h,v,y,b,g,k,C,x,w,E,S,T=n.type;if(void 0!==n.constructor)return null;null!=_.__h&&(c=_.__h,s=n.__e=_.__e,n.__h=null,l=[s]),(f=t.__b)&&f(n);try{e:if("function"==typeof T){if(k=n.props,C=(f=T.contextType)&&o[f.__c],x=f?C?C.props.value:f.__:o,_.__c?g=(d=n.__c=_.__c).__=d.__E:("prototype"in T&&T.prototype.render?n.__c=d=new T(k,x):(n.__c=d=new a(k,x),d.constructor=T,d.render=A),C&&C.sub(d),d.props=k,d.state||(d.state={}),d.context=x,d.__n=o,h=d.__d=!0,d.__h=[]),null==d.__s&&(d.__s=d.state),null!=T.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=u({},d.__s)),u(d.__s,T.getDerivedStateFromProps(k,d.__s))),v=d.props,y=d.state,h)null==T.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==T.getDerivedStateFromProps&&k!==v&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(k,x),!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(k,d.__s,x)||n.__v===_.__v){d.props=k,d.state=d.__s,n.__v!==_.__v&&(d.__d=!1),d.__v=n,n.__e=_.__e,n.__k=_.__k,n.__k.forEach((function(e){e&&(e.__=n)})),d.__h.length&&i.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(k,d.__s,x),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(v,y,b)}))}if(d.context=x,d.props=k,d.__v=n,d.__P=e,w=t.__r,E=0,"prototype"in T&&T.prototype.render)d.state=d.__s,d.__d=!1,w&&w(n),f=d.render(d.props,d.state,d.context);else do{d.__d=!1,w&&w(n),f=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++E<25);d.state=d.__s,null!=d.getChildContext&&(o=u(u({},o),d.getChildContext())),h||null==d.getSnapshotBeforeUpdate||(b=d.getSnapshotBeforeUpdate(v,y)),S=null!=f&&f.type===p&&null==f.key?f.props.children:f,m(e,Array.isArray(S)?S:[S],n,_,o,r,l,i,s,c),d.base=n.__e,n.__h=null,d.__h.length&&i.push(d),g&&(d.__E=d.__=null),d.__e=!1}else null==l&&n.__v===_.__v?(n.__k=_.__k,n.__e=_.__e):n.__e=P(_.__e,n,_,o,r,l,i,c);(f=t.diffed)&&f(n)}catch(e){n.__v=null,(c||null!=l)&&(n.__e=s,n.__h=!!c,l[l.indexOf(s)]=null),t.__e(e,n,_)}}function S(e,n){t.__c&&t.__c(n,e),e.some((function(n){try{e=n.__h,n.__h=[],e.some((function(e){e.call(n)}))}catch(e){t.__e(e,n.__v)}}))}function P(t,n,_,o,l,i,u,c){var f,p,a,h=_.props,v=n.props,y=n.type,b=0;if("svg"===y&&(l=!0),null!=i)for(;b<i.length;b++)if((f=i[b])&&"setAttribute"in f==!!y&&(y?f.localName===y:3===f.nodeType)){t=f,i[b]=null;break}if(null==t){if(null===y)return document.createTextNode(v);t=l?document.createElementNS("http://www.w3.org/2000/svg",y):document.createElement(y,v.is&&v),i=null,c=!1}if(null===y)h===v||c&&t.data===v||(t.data=v);else{if(i=i&&e.call(t.childNodes),p=(h=_.props||r).dangerouslySetInnerHTML,a=v.dangerouslySetInnerHTML,!c){if(null!=i)for(h={},b=0;b<t.attributes.length;b++)h[t.attributes[b].name]=t.attributes[b].value;(a||p)&&(a&&(p&&a.__html==p.__html||a.__html===t.innerHTML)||(t.innerHTML=a&&a.__html||""))}if(function(e,t,n,_,o){var r;for(r in n)"children"===r||"key"===r||r in t||C(e,r,null,n[r],_);for(r in t)o&&"function"!=typeof t[r]||"children"===r||"key"===r||"value"===r||"checked"===r||n[r]===t[r]||C(e,r,t[r],n[r],_)}(t,v,h,l,c),a)n.__k=[];else if(b=n.props.children,m(t,Array.isArray(b)?b:[b],n,_,o,l&&"foreignObject"!==y,i,u,i?i[0]:_.__k&&d(_,0),c),null!=i)for(b=i.length;b--;)null!=i[b]&&s(i[b]);c||("value"in v&&void 0!==(b=v.value)&&(b!==t.value||"progress"===y&&!b||"option"===y&&b!==h.value)&&C(t,"value",b,h.value,!1),"checked"in v&&void 0!==(b=v.checked)&&b!==t.checked&&C(t,"checked",b,h.checked,!1))}return t}function T(e,n,_){try{"function"==typeof e?e(n):e.current=n}catch(e){t.__e(e,_)}}function L(e,n,_){var o,r;if(t.unmount&&t.unmount(e),(o=e.ref)&&(o.current&&o.current!==e.__e||T(o,null,n)),null!=(o=e.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(e){t.__e(e,n)}o.base=o.__P=null}if(o=e.__k)for(r=0;r<o.length;r++)o[r]&&L(o[r],n,"function"!=typeof e.type);_||null==e.__e||s(e.__e),e.__e=e.__d=void 0}function A(e,t,n){return this.constructor(e,n)}function D(n,_,o){var l,i,u;t.__&&t.__(n,_),i=(l="function"==typeof o)?null:o&&o.__k||_.__k,u=[],E(_,n=(!l&&o||_).__k=c(p,null,[n]),i||r,r,void 0!==_.ownerSVGElement,!l&&o?[o]:i?null:_.firstChild?e.call(_.childNodes):null,u,!l&&o?o:i?i.__e:_.firstChild,l),S(u,n)}function N(e,t){D(e,t,N)}function U(t,n,_){var o,r,l,i=u({},t.props);for(l in n)"key"==l?o=n[l]:"ref"==l?r=n[l]:i[l]=n[l];return arguments.length>2&&(i.children=arguments.length>3?e.call(arguments,2):_),f(t.type,i,o||t.key,r||t.ref,null)}e=l.slice,t={__e:function(e,t,n,_){for(var o,r,l;t=t.__;)if((o=t.__c)&&!o.__)try{if((r=o.constructor)&&null!=r.getDerivedStateFromError&&(o.setState(r.getDerivedStateFromError(e)),l=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,_||{}),l=o.__d),l)return o.__E=o}catch(t){e=t}throw e}},n=0,a.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=u({},this.state),"function"==typeof e&&(e=e(u({},n),this.props)),e&&u(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),v(this))},a.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),v(this))},a.prototype.render=p,_=[],y.__r=0;var M=0;function O(e,n,_,o,r){var l,i,u={};for(i in n)"ref"==i?l=n[i]:u[i]=n[i];var s={type:e,props:u,key:_,ref:l,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--M,__source:r,__self:o};if("function"==typeof e&&(l=e.defaultProps))for(i in l)void 0===u[i]&&(u[i]=l[i]);return t.vnode&&t.vnode(s),s}function H(){return(H=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var _ in n)Object.prototype.hasOwnProperty.call(n,_)&&(e[_]=n[_])}return e}).apply(this,arguments)}function W(e){this.getChildContext=function(){return e.context};var t=e.children,n=function(e,t){if(null==e)return{};var n,_,o={},r=Object.keys(e);for(_=0;_<r.length;_++)t.indexOf(n=r[_])>=0||(o[n]=e[n]);return o}(e,["context","children"]);return U(t,n)}function j(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=c(W,H({},this._props,{context:e.detail.context}),function e(t,n){if(3===t.nodeType)return t.data;if(1!==t.nodeType)return null;var _=[],o={},r=0,l=t.attributes,i=t.childNodes;for(r=l.length;r--;)"slot"!==l[r].name&&(o[l[r].name]=l[r].value,o[F(l[r].name)]=l[r].value);for(r=i.length;r--;){var u=e(i[r],null),s=i[r].slot;s?o[s]=c(B,{name:s},u):_[r]=u}var f=n?c(B,null,_):_;return c(n||t.nodeName.toLowerCase(),o,f)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?N:D)(this._vdom,this._root)}function F(e){return e.replace(/-(\w)/g,(function(e,t){return t?t.toUpperCase():""}))}function R(e,t,n){if(this._vdom){var _={};_[e]=n=null==n?void 0:n,_[F(e)]=n,this._vdom=U(this._vdom,_),D(this._vdom,this._root)}}function I(){D(this._vdom=null,this._root)}function B(e,t){var n=this;return c("slot",H({},e,{ref:function(e){e?(n.ref=e,n._listener||(n._listener=function(e){e.stopPropagation(),e.detail.context=t},e.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}!function(e,t,n,_){function o(){var t=Reflect.construct(HTMLElement,[],o);return t._vdomComponent=e,t._root=_&&_.shadow?t.attachShadow({mode:"open"}):t,t}(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=j,o.prototype.attributeChangedCallback=R,o.prototype.disconnectedCallback=I,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),o.observedAttributes=n,n.forEach((function(e){Object.defineProperty(o.prototype,e,{get:function(){return this._vdom.props[e]},set:function(t){this._vdom?this.attributeChangedCallback(e,null,t):(this._props||(this._props={}),this._props[e]=t,this.connectedCallback());var n=typeof t;null!=t&&"string"!==n&&"boolean"!==n&&"number"!==n||this.setAttribute(e,t)}})})),customElements.define("superhero-benefits-onboarding",o)}((function(){return O("div",{children:O("p",{children:"Hello, Superhero."})})}),0,[],{shadow:!0})})();
package/package.json CHANGED
@@ -1,8 +1,11 @@
1
1
  {
2
2
  "name": "@flarehr/superhero-benefits-onboarding",
3
- "version": "0.9.8",
3
+ "version": "0.10.9",
4
4
  "description": "Flare Superhero Benefits Onboarding Component",
5
5
  "license": "MIT",
6
+ "files": [
7
+ "dist/"
8
+ ],
6
9
  "scripts": {
7
10
  "start": "webpack serve --mode development",
8
11
  "build": "webpack --mode production --node-env production",
package/.eslintignore DELETED
@@ -1 +0,0 @@
1
- *.config.js
package/.eslintrc.json DELETED
@@ -1,15 +0,0 @@
1
- {
2
- "root": true,
3
- "parser": "@typescript-eslint/parser",
4
- "plugins": [
5
- "@typescript-eslint"
6
- ],
7
- "extends": [
8
- "plugin:@typescript-eslint/recommended",
9
- "preact",
10
- "prettier"
11
- ],
12
- "rules": {
13
- "@typescript-eslint/explicit-function-return-type": "error"
14
- }
15
- }
package/.prettierignore DELETED
@@ -1,2 +0,0 @@
1
- package-lock.json
2
- package.json
package/.prettierrc.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "printWidth": 100,
3
- "singleQuote": true,
4
- "semi": true,
5
- "trailingComma": "none"
6
- }
@@ -1,9 +0,0 @@
1
- import { FunctionComponent } from 'preact';
2
-
3
- const App: FunctionComponent = () => (
4
- <div>
5
- <p>Hello, Superhero.</p>
6
- </div>
7
- );
8
-
9
- export default App;
package/src/index.ts DELETED
@@ -1,8 +0,0 @@
1
- import App from './components/app';
2
- import register from 'preact-custom-element';
3
-
4
- export const BenefitsOnboardingCustomElementName = 'superhero-benefits-onboarding';
5
-
6
- register(App, BenefitsOnboardingCustomElementName, [], {
7
- shadow: true
8
- });
@@ -1,16 +0,0 @@
1
- <!-- This file is used for dev only. Does not get included in built files. -->
2
- <!DOCTYPE html>
3
- <html lang="en">
4
- <head>
5
- <meta charset="utf-8" />
6
- <title>Superhero: Benefits Onboarding</title>
7
- <style>
8
- body {
9
- margin: 0;
10
- }
11
- </style>
12
- </head>
13
- <body>
14
- <superhero-benefits-onboarding />
15
- </body>
16
- </html>
@@ -1,3 +0,0 @@
1
- module.exports = {
2
- content: ['./src/**/*.{ts,tsx,html}'],
3
- };
package/tsconfig.json DELETED
@@ -1,66 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- /* Basic Options */
4
- "target": "ES5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */
5
- "module": "ESNext", /* Specify module code generation: 'none', commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
6
- // "lib": [], /* Specify library files to be included in the compilation: */
7
- "allowJs": true, /* Allow javascript files to be compiled. */
8
- // "checkJs": true, /* Report errors in .js files. */
9
- "jsx": "react-jsx", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
10
- "jsxImportSource": "preact",
11
- // "jsxFactory": "h", /* Specify the JSX factory function to use when targeting react JSX emit, e.g. React.createElement or h. */
12
- // "jsxFragmentFactory": "Fragment", /* Specify the JSX fragment factory function to use when targeting react JSX emit with jsxFactory compiler option is specified, e.g. Fragment. */
13
- // "declaration": true, /* Generates corresponding '.d.ts' file. */
14
- // "sourceMap": true, /* Generates corresponding '.map' file. */
15
- // "outFile": "./", /* Concatenate and emit output to single file. */
16
- // "outDir": "./", /* Redirect output structure to the directory. */
17
- // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
18
- // "removeComments": true, /* Do not emit comments to output. */
19
- "noEmit": false, /* Do not emit outputs. */
20
- // "importHelpers": true, /* Import emit helpers from 'tslib'. */
21
- // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
22
- // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
23
-
24
- /* Strict Type-Checking Options */
25
- "strict": true, /* Enable all strict type-checking options. */
26
- // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
27
- // "strictNullChecks": true, /* Enable strict null checks. */
28
- // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
29
- // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
30
-
31
- /* Additional Checks */
32
- // "noUnusedLocals": true, /* Report errors on unused locals. */
33
- // "noUnusedParameters": true, /* Report errors on unused parameters. */
34
- // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
35
- // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
36
-
37
- /* Module Resolution Options */
38
- "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
39
- "esModuleInterop": true, /* */
40
- "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
41
- // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
42
- // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
43
- // "typeRoots": [], /* List of folders to include type definitions from. */
44
- // "types": [], /* Type declaration files to be included in compilation. */
45
- // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
46
- // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
47
-
48
- /* Source Map Options */
49
- // "sourceRoot": "./", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
50
- // "mapRoot": "./", /* Specify the location where debugger should locate map files instead of generated locations. */
51
- // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
52
- // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
53
-
54
- /* Experimental Options */
55
- // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
56
- // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
57
-
58
- /* Advanced Options */
59
- "skipLibCheck": true, /* Skip type checking of declaration files. */
60
- "paths": {
61
- "react": ["./node_modules/preact/compat/"],
62
- "react-dom": ["./node_modules/preact/compat/"]
63
- }
64
- },
65
- "include": ["src/**/*", "tests/**/*"]
66
- }
package/webpack.config.js DELETED
@@ -1,63 +0,0 @@
1
- const path = require('path');
2
- const webpack = require('webpack');
3
- const HtmlWebpackPlugin = require('html-webpack-plugin');
4
-
5
- module.exports = (_env, argv) => {
6
- const isProduction = argv.mode === 'production';
7
-
8
- return {
9
- mode: isProduction ? 'production' : 'development',
10
- devtool: isProduction ? false : 'inline-source-map',
11
- entry: {
12
- 'superhero-benefits-onboarding': './src/index.ts'
13
- },
14
- output: {
15
- filename: '[name].js',
16
- path: path.resolve(__dirname, 'dist'),
17
- assetModuleFilename: 'assets/[name][ext]'
18
- },
19
- devServer: {
20
- port: 8090,
21
- hot: true,
22
- historyApiFallback: true
23
- },
24
- module: {
25
- rules: [
26
- {
27
- test: /\.tsx?$/,
28
- use: 'ts-loader',
29
- exclude: /node_modules/
30
- },
31
- {
32
- test: /\.css$/,
33
- exclude: /node_modules/,
34
- use: ['css-loader', 'postcss-loader']
35
- },
36
- {
37
- test: /\.(png|jpg|jpeg|gif)$/i,
38
- type: 'asset/resource'
39
- },
40
- {
41
- test: /\.svg$/i,
42
- issuer: /\.[jt]sx?$/,
43
- use: ['@svgr/webpack']
44
- }
45
- ]
46
- },
47
- plugins: isProduction
48
- ? []
49
- : [
50
- new HtmlWebpackPlugin({
51
- template: path.resolve('./src/template.dev.html')
52
- })
53
- ],
54
- resolve: {
55
- extensions: ['.tsx', '.ts', '.js'],
56
- alias: {
57
- react: 'preact/compat',
58
- 'react-dom': 'preact/compat',
59
- 'react/jsx-runtime': 'preact/jsx-runtime'
60
- }
61
- }
62
- };
63
- };