angular-library-seed icon indicating copy to clipboard operation
angular-library-seed copied to clipboard

How can I include assets like images in library, and use them for img src ?

Open MarketingLimited opened this issue 8 years ago • 1 comments

How can I include assets like images in library, and use them for img src ?

MarketingLimited avatar Oct 12 '17 15:10 MarketingLimited

You need to copy the assets folder to the dist folder for that you can try this out. This is how i did it and achieved the desired. npm install copy-webpack-plugin

In your webpack-umd.config.ts file make below changes:-

import * as CopyWebpackPlugin from 'copy-webpack-plugin';

add below to your plugins

plugins: [
new CopyWebpackPlugin([
      { from: './src/assets', to: './assets' },
    ])
]

manishjanky avatar Mar 28 '18 11:03 manishjanky