Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
MarketingLimited opened this issue Oct 12, 2017 · 1 comment

Comments

@MarketingLimited
Copy link

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

@manishjanky
Copy link

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' },
    ])
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants