@teambit/react 0.0.804 → 0.0.805
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.
- package/apps/web/react-app-options.ts +1 -1
- package/apps/web/react.application.ts +3 -2
- package/apps/web/webpack/mutators.ts +1 -0
- package/artifacts/__bit_junit.xml +2 -2
- package/artifacts/env-template/public/{22.20acd98351f2158a41da.js → 22.0f657f2dfdd8e90d81ba.js} +0 -0
- package/artifacts/env-template/public/{994.bb73ab7fa3ec9ae9dc3b.js → 750.2bbe0002ca73603de518.js} +19 -11
- package/artifacts/env-template/public/assets-manifest.json +14 -14
- package/artifacts/env-template/public/{compositions.52254428c46016cd7126.js → compositions.853254f720441442d37a.js} +1 -1
- package/artifacts/env-template/public/compositions.html +1 -1
- package/artifacts/env-template/public/{overview.feaf6bb95eb88100792c.js → overview.0ca27c1c75ca340b6722.js} +1 -1
- package/artifacts/env-template/public/overview.html +1 -1
- package/artifacts/env-template/public/peers.283551d5f03dbfad5477.js +1 -0
- package/artifacts/env-template/public/{preview-root.3a0d522c80063747b87d.js → preview-root.b859b02336387c766d60.js} +1 -1
- package/artifacts/env-template/public/static/css/{994.90cfc900.css → 750.f6840c3e.css} +1 -1
- package/artifacts/preview/teambit_react_react-preview.js +1 -1
- package/{compositions-1659347901202.js → compositions-1659456045857.js} +0 -0
- package/dist/apps/web/react-app-options.d.ts +1 -1
- package/dist/apps/web/react-app-options.js.map +1 -1
- package/dist/apps/web/react.application.d.ts +2 -2
- package/dist/apps/web/react.application.js +1 -1
- package/dist/apps/web/react.application.js.map +1 -1
- package/dist/apps/web/webpack/mutators.js +1 -0
- package/dist/apps/web/webpack/mutators.js.map +1 -1
- package/dist/react.main.runtime.d.ts +3 -2
- package/dist/react.main.runtime.js +4 -3
- package/dist/react.main.runtime.js.map +1 -1
- package/{overview-1659347901202.js → overview-1659456045857.js} +0 -0
- package/package-tar/teambit-react-0.0.805.tgz +0 -0
- package/package.json +30 -30
- package/{preview-1659347901202.js → preview-1659456045857.js} +2 -2
- package/artifacts/env-template/public/peers.1d2b76311bfbf98a86fc.js +0 -1
- package/package-tar/teambit-react-0.0.804.tgz +0 -0
|
@@ -21,7 +21,7 @@ import { createExpressSsr, loadSsrApp, parseAssets } from './ssr/ssr-express';
|
|
|
21
21
|
export class ReactApp implements Application {
|
|
22
22
|
constructor(
|
|
23
23
|
readonly name: string,
|
|
24
|
-
readonly entry: string[] | (() => Promise<string[]>),
|
|
24
|
+
readonly entry: string[] | ((path?: string) => Promise<string[]>),
|
|
25
25
|
readonly ssr: string | (() => Promise<string>) | undefined,
|
|
26
26
|
readonly portRange: [number, number],
|
|
27
27
|
private reactEnv: ReactEnv,
|
|
@@ -170,13 +170,14 @@ export class ReactApp implements Application {
|
|
|
170
170
|
if (this.bundler) return this.bundler;
|
|
171
171
|
return this.getDefaultBundler(context);
|
|
172
172
|
}
|
|
173
|
+
|
|
173
174
|
private async getDefaultBundler(context: AppBuildContext) {
|
|
174
175
|
const { capsule } = context;
|
|
175
176
|
const reactEnv: ReactEnv = context.env as ReactEnv;
|
|
176
177
|
const publicDir = this.getPublicDir(context.artifactsDir);
|
|
177
178
|
const outputPath = join(capsule.path, publicDir);
|
|
178
179
|
const { distDir } = reactEnv.getCompiler();
|
|
179
|
-
const targetEntries = Array.isArray(this.entry) ? this.entry : await this.entry();
|
|
180
|
+
const targetEntries = Array.isArray(this.entry) ? this.entry : await this.entry(`${capsule.path}/${distDir}`);
|
|
180
181
|
const entries = targetEntries.map((entry) => require.resolve(`${capsule.path}/${distDir}/${basename(entry)}`));
|
|
181
182
|
const staticDir = join(outputPath, this.dir);
|
|
182
183
|
|
|
@@ -2,6 +2,7 @@ import { WebpackConfigMutator } from '@teambit/webpack';
|
|
|
2
2
|
|
|
3
3
|
export function addDevServer(configMutator: WebpackConfigMutator) {
|
|
4
4
|
return configMutator.addTopLevel('devServer', {
|
|
5
|
+
allowedHosts: 'all',
|
|
5
6
|
historyApiFallback: {
|
|
6
7
|
index: '/index.html',
|
|
7
8
|
disableDotRule: true,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<testsuites>
|
|
3
|
-
<testsuite name="teambit.react/react@0.0.
|
|
4
|
-
<testcase classname="index-file.spec.js" name="should match snapshot" time="0.
|
|
3
|
+
<testsuite name="teambit.react/react@0.0.805" timestamp="2022-08-02T16:22:27.924Z" tests="1" failures="0" errors="0" skipped="0">
|
|
4
|
+
<testcase classname="index-file.spec.js" name="should match snapshot" time="0.176"/>
|
|
5
5
|
</testsuite>
|
|
6
6
|
</testsuites>
|
package/artifacts/env-template/public/{22.20acd98351f2158a41da.js → 22.0f657f2dfdd8e90d81ba.js}
RENAMED
|
File without changes
|