-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
1,889 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,3 +21,6 @@ | |
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
aggregated-translations/* | ||
.eslintcache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
module.exports = { | ||
webpack(config, env) { | ||
// config.entry = './src/single-spa-entry.js'; | ||
config.externals = ['react', 'react-dom', 'single-spa', new RegExp(`^@nickpith/`)]; | ||
config.output = { | ||
...config.output, | ||
filename: 'nickpith-root-config.js', | ||
libraryTarget: 'system', | ||
}; | ||
config.plugins = config.plugins.filter(plugin => plugin.constructor.name !== 'HtmlWebpackPlugin' && plugin.constructor.name !== 'MiniCssExtractPlugin'); | ||
delete config.optimization; | ||
return config; | ||
}, | ||
devServer(configFunction) { | ||
return function (proxy, allowedHost) { | ||
const config = configFunction(proxy, allowedHost); | ||
config.disableHostCheck = true | ||
config.headers = config.headers || {} | ||
config.headers['Access-Control-Allow-Origin'] = '*' | ||
return config | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,44 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<html lang="en" dir="ltr"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" /> | ||
<!-- <link rel="icon" href="%PUBLIC_URL%/favicon.ico" /> --> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<meta name="theme-color" content="#000000" /> | ||
<meta | ||
name="description" | ||
content="Web site created using create-react-app" | ||
/> | ||
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" /> | ||
|
||
<meta name="importmap-type" content="systemjs-importmap" /> | ||
<script type="systemjs-importmap"> | ||
{ | ||
"imports": { | ||
"single-spa": "https://cdn.jsdelivr.net/npm/[email protected]/lib/system/single-spa.min.js", | ||
"react": "https://cdn.jsdelivr.net/npm/[email protected]/umd/react.production.min.js", | ||
"react-dom": "https://cdn.jsdelivr.net/npm/[email protected]/umd/react-dom.production.min.js" | ||
} | ||
} | ||
</script> | ||
<link rel="preload" href="https://cdn.jsdelivr.net/npm/[email protected]/lib/system/single-spa.min.js" as="script"> | ||
<script type="systemjs-importmap"> | ||
{ | ||
"imports": { | ||
"@nickpith/root-config": "http://localhost:3000/nickpith-root-config.js", | ||
"@nickpith/app1": "http://localhost:3001/nickpith-app1.js" | ||
} | ||
} | ||
</script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/import-map-overrides.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/system.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/extras/amd.js"></script> | ||
|
||
<!-- <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" /> --> | ||
<!-- | ||
manifest.json provides metadata used when your web app is installed on a | ||
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/ | ||
--> | ||
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> | ||
<!-- <link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> --> | ||
<!-- | ||
Notice the use of %PUBLIC_URL% in the tags above. | ||
It will be replaced with the URL of the `public` folder during the build. | ||
|
@@ -28,7 +52,10 @@ | |
</head> | ||
<body> | ||
<noscript>You need to enable JavaScript to run this app.</noscript> | ||
<div id="root"></div> | ||
<div id="root" style="height: 100%;"></div> | ||
<script> | ||
System.import('@nickpith/root-config'); | ||
</script> | ||
<!-- | ||
This HTML file is a template. | ||
If you open it directly in the browser, you will see an empty page. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"App.Name": "Test" | ||
} |
Oops, something went wrong.