3

I'm creating web components in Angular by grabbing .js files which include runtime.js, polyfills.js and main.js and concatenating them into single file called list.js by using below code

const fs = require('fs-extra');
const concat = require('concat');

(async function build() {

    const files = [
        './dist/dls-webcomponents/runtime.js',
        './dist/dls-webcomponents/polyfills.js',
        './dist/dls-webcomponents/main.js'             
    ]

    await fs.ensureDir('elements')

    await concat(files, 'elements/list.js')

})()

angular.json

"scripts": {
     ...
    "build:elements": "ng build --prod --output-hashing none && node build-helper.js "
  }

While generating the production build angular is creating above .js files along with styles.css file.

Is there anyway that I can include this styles in above list.js file?

Raghav
  • 1,139
  • 4
  • 15
  • 35

0 Answers0