Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

315
Views
Script Loader - Web pack alternatives to Resolve Server Side Rendering build issue (Angular 6)

I'm using using a 3rd party Content management SDK ("dc-delivery-sdk-js": "^0.11.0") which throws error as you may need appropriate loader when trying to run " npm run build:ssr " (Server Dide Rendering build during local development)

ERROR in ./node_modules/dc-delivery-sdk-js/build/module/lib/client/createContentClientV2Fresh.js 3:37
Module parse failed: Unexpected token (3:37)
You may need an appropriate loader to handle this file type.
| import axiosRetry from 'axios-retry';
| import { createBaseContentClient } from './createBaseContentClient';
> const isThrottled = (error) => error?.response?.status === 429;
| const DEFAULT_RETRY_CONFIG = {
|     retries: 3,
 @ ./node_modules/dc-delivery-sdk-js/build/module/lib/client/createContentClient.js 2:0-74 11:15-41
 @ ./node_modules/dc-delivery-sdk-js/build/module/lib/ContentClient.js
 @ ./node_modules/dc-delivery-sdk-js/build/module/index.js
 @ ./dist/moltonbrown-server/main.js
 @ ./server.ts

ERROR in ./node_modules/dc-delivery-sdk-js/build/module/lib/content/coordinators/FilterByImpl.js 9:42
Module parse failed: Unexpected token (9:42)
You may need an appropriate loader to handle this file type.
|     async fetch(requestConfig) {
|         try {
>             if (!requestConfig.parameters?.locale && this.config?.locale) {
|                 requestConfig.parameters = Object.assign({}, {
|                     ...(requestConfig.parameters || {}),
 @ ./node_modules/dc-delivery-sdk-js/build/module/lib/ContentClient.js 8:0-67 113:19-31
 @ ./node_modules/dc-delivery-sdk-js/build/module/index.js
 @ ./dist/moltonbrown-server/main.js
 @ ./server.ts

I've tried script-loader (https://v4.webpack.js.org/loaders/script-loader/) which resolves the build issue locally but throw error post deployment since its has not suppport for Node.js which actually runs the SSR build in server.

any other alternative webpack loaders or solutions to resolve this issue for Angular 6 project ?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!