Questions tagged [webpack-file-loader]

Hadles such imports

import img from './file.png'

with this configuration

  rules: [
  {
    test: /\.(gif|jpg|png)$/,
    use: [
      {
        loader: 'file-loader'
      }
    ]
  }

and result: image files were copied to output folder.

Other application: copy css styles to the output folder adding the hash.

https://github.com/webpack-contrib/file-loader

289 questions
0
votes
1 answer

PostCSS / Webpack not loading image in stylesheet

I'm not sure if this is a PostCSS problem or a Webpack problem. Here's my relevant image handler in my webpack config: { test: /\.(png|jpg|jpeg|gif|woff|woff2)$/, loader: 'url-loader?limit=10000', }, { test: /\.(eot|ttf|wav|mp3)$/, loader:…
-1
votes
1 answer

Webpack. Image loading failed

Using webpack for the first time. Can't load images in there. Tried a LOT of things to fix it, but... I included my images in html through img src. I also did import in index.js: import backGround from '../img/bg.jpg'; const bgImg =…
-1
votes
1 answer

How to get file hash name in Angular?

In Angular 4 I've used Webpack's (or even File-loader's) require method to get Image hash name: const versionedName = require('assets/images/icn-copy.svg'); It returns something like "assets/images/icn-copy.435435fj5435f345345f435f435f345f.svg" -…
Alex Vovchuk
  • 2,828
  • 4
  • 19
  • 40
-1
votes
1 answer

How to add more than one CSS file using webpack project

I have 2 CSS files style.css and responsive.css , I need to add both the files in head tag , please help me....
Adarsha Beleyur
  • 157
  • 1
  • 1
  • 7
1 2 3
19
20