thepassle / create-lit-app

Create LitHTML apps with no build configuration. (LitHTML/Redux/Webpack/Express)
https://create-lit-app.herokuapp.com
110 stars 10 forks source link

Images to be bundled to production is hardcoded in the webpack config #11

Closed jlengrand closed 5 years ago

jlengrand commented 5 years ago

Hey there,

In my app, I am using more than the few images that the generated template comes from. I was confused that my images were missing from the assets after running npm run build, but it looks like the list of images to be copied is hardcoded.

See this snippet (or directly in your code here).

const assets = [
  {
    from: resolve('./src/assets/favicon.ico'),
    to: resolve('dist/assets/')
  },
  {
    from: resolve('./src/assets/logo.svg'),
    to: resolve('dist/assets/')
  },
  {
    from: resolve('./src/assets/github.svg'),
    to: resolve('dist/assets/')
  }
];

It probably would be better to bundle all files in the assets folder?

jlengrand commented 5 years ago

MR incoming