Skip to content
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.

File loader freezes webpack #82

Closed
bensampaio opened this issue Jul 6, 2016 · 3 comments
Closed

File loader freezes webpack #82

bensampaio opened this issue Jul 6, 2016 · 3 comments

Comments

@bensampaio
Copy link

I decided to use file loader to copy the images I reference in my SCSS into my public assets folder. So I added the following to my webpack config file:

module: {
  loaders: [
    /* babel and css loaders */
    {
      loader: 'file?name=[name].[ext]!img',
      test: /\.(jpe?g|png|gif|svg)$/i,
    }
  ]
}

The first time I tried to run webpack with that configuration it stopped in: 67% 686/714 build modules. The process continued running but didn't move from that point and there were no error messages. I also tried to set output.publicPath but nothing changed.

Besides the file loader, I am using babel to transpile ES2015 and React and the css, sass and postcss loaders.

What am I doing wrong?

@bensampaio bensampaio changed the title File loader blocks webpack File loader freezes webpack Jul 6, 2016
@SpaceK33z
Copy link
Contributor

I'm using file-loader with sass-loader in many projects, but I don't have this issue. Could you provide a repo that reproduces this problem?

@michael-ciniawsky
Copy link
Member

@bensampaio see @SpaceK33z comment and reopen if have time to setup a repo to test 😛

@bensampaio
Copy link
Author

Later on I realised this problem was related to sass-loader: webpack-contrib/sass-loader#100. It was just a coincidence that the problem started happening after I added the file-loader.

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

No branches or pull requests

3 participants