Adds scss as default style extension. Adds index.html as get route for the ssr server

parent debd294e
Pipeline #23838 passed with stages
in 11 minutes and 58 seconds
......@@ -145,5 +145,10 @@
}
}
},
"defaultProject": "frontend"
"defaultProject": "frontend",
"schematics": {
"@schematics/angular:component": {
"styleext": "scss"
}
}
}
\ No newline at end of file
......@@ -13,7 +13,8 @@
"start:SSR": "cd dist && node server",
"start:DEV": "ng serve --host 0.0.0.0 --port 4210 --disable-host-check --aot",
"build:DEV": "ng serve --host 0.0.0.0 --port 4210 --disable-host-check --aot --prod",
"build:SSR": "npm run build:PROD && npm run purify && npm run build:SERVER && npm run webpack:SERVER",
"ngsw:version": "ngsw-config dist/browser src/ngsw-config.json",
"build:SSR": "npm run build:PROD && npm run purify && npm run build:SERVER && npm run webpack:SERVER && npm run ngsw:version",
"build:SERVER": "ng run frontend:server",
"build:PROD": "ng build --prod",
"build:PROD-STATS": "ng build --prod --stats-json",
......
......@@ -60,6 +60,10 @@ app.get('/api/*', (req, res) => {
res.status(404).send('data requests are not supported');
});
app.get('/index.html', (req, res) => {
res.render(path.join(DIST_FOLDER, 'browser', 'index.html'), { req });
});
// Server static files from /browser
app.get('*.*', express.static(path.join(DIST_FOLDER, 'browser')));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment