Giter VIP home page Giter VIP logo

Comments (12)

EugeneHlushko avatar EugeneHlushko commented on May 30, 2024 10

Try removing sourceMap param from css loader @luqin

from url-loader.

michael-ciniawsky avatar michael-ciniawsky commented on May 30, 2024 3

@bengrunfeld I will test it and take a deeper look soon 😛 things a saw at first glance are

.babelrc

- ['env', 'es2015', 'react']
+ ['env', 'react']

babel-preset-env 'includes' babel-preset-es2015 already you applying it twice atm, check the README :)

For the URL issue, since you're are using sass-loader you may need resolve-url-loader, but as I said I will come back here later 🙃

from url-loader.

brandondurham avatar brandondurham commented on May 30, 2024 1

All good here! Removing sourceMaps did the trick.

from url-loader.

wmadden avatar wmadden commented on May 30, 2024

FWIW I had to debug the same problem and I posted my findings on StackOverflow: http://stackoverflow.com/questions/34133808/webpack-ots-parsing-error-loading-fonts/34133809#34133809

Chrome has problems with paths that don't specify the protocol

from url-loader.

luqin avatar luqin commented on May 30, 2024

The same problem +1

from url-loader.

brandonaaskov avatar brandonaaskov commented on May 30, 2024

Though I was trying to get base64 strings to render properly (and couldn't), this at least led me to the absolute URL solution. I don't love it, but it's literally the only thing I've gotten to work, so thank you @wmadden.

from url-loader.

aototo avatar aototo commented on May 30, 2024

@EugeneHlushko Thank you!

from url-loader.

michael-ciniawsky avatar michael-ciniawsky commented on May 30, 2024

@brandondurham You still experience this regression ?

from url-loader.

bengrunfeld avatar bengrunfeld commented on May 30, 2024

@EugeneHlushko can you please show code, or give explanation of how to remove the sourceMap param from the CSS (or SASS) loader?

e.g. if these are your loaders in webpack.config.js, where would you change the code?

{
  test: /\.(png|jpg)$/,
  loader: 'url-loader?limit=20000'
},
{
  test: /\.scss$/,
  loader: 'style-loader!css-loader!sass-loader'
}

from url-loader.

michael-ciniawsky avatar michael-ciniawsky commented on May 30, 2024

@bengrunfeld With the webpack.config.js you posted sourceMap should be off already, what is your particular issue ? Please provide more info about your setup (webpack version, loader versions, webpack.config.js) and logs (stacktrace) etc.

from url-loader.

bengrunfeld avatar bengrunfeld commented on May 30, 2024

@michael-ciniawsky Here is a link to a repo with an example of the bug. link

Clone, npm install and run webpack and if you open index.html in Chrome, you will see the following error in the developer console: Failed to load resource: net::ERR_FILE_NOT_FOUND, but if you inspect the offending element <div class="lisa"></div> you will see that a direct URL has been created for this resource, although it does not resolve to an actual image.

Again, maybe this is a usage error, but hard to tell from my perspective since I am receiving no Webpack errors.

from url-loader.

delebash avatar delebash commented on May 30, 2024

Any update on this? I don't have source-maps enabled. The one difference from the OP's is that my css is inside "<style>" tags instead of a separate css file

from url-loader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.