parent
83f2001230
commit
5a0634323e
@ -51,7 +51,7 @@ import { AppServerModule } from './bootstrap.server';
|
||||
// The Express app is exported so that it can be used by serverless Functions.
|
||||
export function app(): express.Express {
|
||||
const server = express();
|
||||
const browserBundles = join(process.cwd(), 'dist/apps/test/browser');
|
||||
const browserBundles = join(process.cwd(), 'dist/test/browser');
|
||||
|
||||
server.use(cors());
|
||||
const indexHtml = existsSync(join(browserBundles, 'index.original.html'))
|
||||
@ -223,7 +223,7 @@ import bootstrap from './bootstrap.server';
|
||||
// The Express app is exported so that it can be used by serverless Functions.
|
||||
export function app(): express.Express {
|
||||
const server = express();
|
||||
const browserBundles = join(process.cwd(), 'dist/apps/test/browser');
|
||||
const browserBundles = join(process.cwd(), 'dist/test/browser');
|
||||
|
||||
server.use(cors());
|
||||
const indexHtml = existsSync(join(browserBundles, 'index.original.html'))
|
||||
|
||||
@ -12,7 +12,7 @@ import<% if(standalone) { %> bootstrap <% } else { %> { AppServerModule } <% } %
|
||||
// The Express app is exported so that it can be used by serverless Functions.
|
||||
export function app(): express.Express {
|
||||
const server = express();
|
||||
const browserBundles = join(process.cwd(), 'dist/apps/<%= appName %>/browser');
|
||||
const browserBundles = join(process.cwd(), '<%= browserBundleOutput %>');
|
||||
|
||||
server.use(cors());
|
||||
const indexHtml = existsSync(join(browserBundles, 'index.original.html'))
|
||||
|
||||
@ -35,8 +35,14 @@ export async function addSsr(tree: Tree, options: Schema, appName: string) {
|
||||
"import('./src/main.server');"
|
||||
);
|
||||
|
||||
const browserBundleOutput = joinPathFragments(
|
||||
project.targets.build.options.outputPath,
|
||||
'browser'
|
||||
);
|
||||
|
||||
generateFiles(tree, join(__dirname, '../files'), project.root, {
|
||||
appName,
|
||||
browserBundleOutput,
|
||||
standalone: options.standalone,
|
||||
tmpl: '',
|
||||
});
|
||||
|
||||
@ -60,8 +60,8 @@ import { AppServerModule } from './bootstrap.server';
|
||||
// The Express app is exported so that it can be used by serverless Functions.
|
||||
export function app(): express.Express {
|
||||
const server = express();
|
||||
const browserBundles = join(process.cwd(), 'dist/apps/test/browser');
|
||||
const serverBundles = join(process.cwd(), 'dist/apps/test/server');
|
||||
const browserBundles = join(process.cwd(), 'dist/test/browser');
|
||||
const serverBundles = join(process.cwd(), 'dist/test/server');
|
||||
|
||||
server.use(cors());
|
||||
const indexHtml = existsSync(join(browserBundles, 'index.original.html'))
|
||||
|
||||
@ -12,8 +12,8 @@ import<% if(standalone) { %> bootstrap <% } else { %> { AppServerModule } <% } %
|
||||
// The Express app is exported so that it can be used by serverless Functions.
|
||||
export function app(): express.Express {
|
||||
const server = express();
|
||||
const browserBundles = join(process.cwd(), 'dist/apps/<%= appName %>/browser');
|
||||
const serverBundles = join(process.cwd(), 'dist/apps/<%= appName %>/server');
|
||||
const browserBundles = join(process.cwd(), '<%= browserBundleOutput %>');
|
||||
const serverBundles = join(process.cwd(), '<%= serverBundleOutput %>');
|
||||
|
||||
server.use(cors());
|
||||
const indexHtml = existsSync(join(browserBundles, 'index.original.html'))
|
||||
|
||||
@ -41,12 +41,23 @@ export async function addSsr(
|
||||
"import('./src/main.server');"
|
||||
);
|
||||
|
||||
const browserBundleOutput = joinPathFragments(
|
||||
project.targets.build.options.outputPath,
|
||||
'browser'
|
||||
);
|
||||
const serverBundleOutput = joinPathFragments(
|
||||
project.targets.build.options.outputPath,
|
||||
'server'
|
||||
);
|
||||
|
||||
generateFiles(
|
||||
tree,
|
||||
joinPathFragments(__dirname, '../files/base'),
|
||||
project.root,
|
||||
{
|
||||
appName,
|
||||
browserBundleOutput,
|
||||
serverBundleOutput,
|
||||
standalone,
|
||||
tmpl: '',
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user