bundled-nest
bundled-nest copied to clipboard
ERROR in main.js from Terser Unexpected character '@'
Having issue while running npm run build:prod
Error Logs:
> rimraf dist && webpack
[webpack-cli] Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
- configuration.module has an unknown property 'loaders'. These properties are valid:
object { defaultRules?, exprContextCritical?, exprContextRecursive?, exprContextRegExp?, exprContextRequest?, generator?, noParse?, parser?, rules?, strictExportPresence?, strictThisContextOnImports?, unknownContextCritical?, unknownContextRecursive?, unknownContextRegExp?, unknownContextRequest?, unsafeCache?, wrappedContextCritical?, wrappedContextRecursive?, wrappedContextRegExp? }
-> Options affecting the normal modules (`NormalModuleFactory`).
Did you mean module.rules or module.rules.*.use?
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] build:prod: `rimraf dist && webpack`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] build:prod script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/adeel/.npm/_logs/2021-01-09T12_50_01_864Z-debug.log
Hello there! It has been 16 months since I last updated this repository. It is left here as archived for historical reference only. It is unfortunate, but it seems like the community has agreed that it is generally not recommended to bundle your Node server. This was a bare minimum example of what it took to get bundling working without a lot of 3rd party dependencies. I managed to get the Docker image down to a very small size, and running as a bare minimum Nest Express server. Though for any real world application, you generally should not bundle your Node app, and ensure to install your node_modules in the Docker image. The reason being is that there are a lot of packages in the wild that have dependencies that are not just pure Javascript.
This repo is more or less retired now. Though if you are interested in a enterprise-grade technology stack, please do check out my actively maintained repo: ⛩ Zen ⛩ Nest + Prisma + Angular 🏮 Full Stack Starter Kit
Cheers @nouman-mpayg! Let me know if you need anything bud. ^_^