Closed garysounigo closed 1 year ago
Angular version 8 is no longer supported. More over it looks like you are using a custom webpack builders which is also not supported by the Angular team.
See: https://angular.io/guide/releases#actively-supported-versions to learn more about which Angular versions are supported.
Yes, I know it is no longer supported but its a "very basic" case as i didnt change nothing from angular.json
and package.json
since i run ng new
.
So, no i didnt use a custom webpack builder neither specific configuration different from the Angular Team when they release version 8.
Here is my original and untouched package.json
:
{
"name": "my-project",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"compile:server": "webpack --config webpack.server.config.js --progress --colors",
"serve:ssr": "node dist/server",
"build:ssr": "npm run build:client-and-server-bundles && npm run compile:server",
"build:client-and-server-bundles": "ng build --prod && ng run my-project:server:production --bundleDependencies all"
},
"private": true,
"dependencies": {
"@angular/animations": "~8.1.1",
"@angular/common": "~8.1.1",
"@angular/compiler": "~8.1.1",
"@angular/core": "~8.1.1",
"@angular/forms": "~8.1.1",
"@angular/platform-browser": "~8.1.1",
"@angular/platform-browser-dynamic": "~8.1.1",
"@angular/platform-server": "~8.1.1",
"@angular/router": "~8.1.1",
"@nguniversal/express-engine": "^8.1.1",
"@nguniversal/module-map-ngfactory-loader": "8.1.1",
"express": "^4.15.2",
"rxjs": "~6.4.0",
"tslib": "^1.9.0",
"zone.js": "~0.9.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.801.1",
"@angular/cli": "~8.1.1",
"@angular/compiler-cli": "~8.1.1",
"@angular/language-service": "~8.1.1",
"@types/node": "~8.9.4",
"@types/jasmine": "~3.3.8",
"@types/jasminewd2": "~2.0.3",
"codelyzer": "^5.0.0",
"jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.1.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.0",
"protractor": "~5.4.0",
"ts-loader": "^5.2.0",
"ts-node": "~7.0.0",
"tslint": "~5.15.0",
"typescript": "~3.4.3",
"webpack-cli": "^3.1.0"
}
}
Hope you can help me or lead me to a solution. Thanks
You should ask that kind of question on StackOverflow. We don't provide support for unsupported versions. (<v14 today).
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
Command
run
Description
Webpack don't replace file
envrionment.ts
byenvironment.prod.ts
when buildserver.ts
withng run my-project:server:production
andwebpack --config webpack.server.config.js --progress --colors
Minimal Reproduction
I import
environment
from./src/environments/environment
inserver.ts
I compiled my application using
ng
and the server script with:
But webpack doesnt take production configuration into account as fileReplacement is not done when i check
dist/server.js
I already try to compile the server with the
--production
option :But i still get the same behaviour
Your Environment