Skip to content
#

webpack-loader

Here are 498 public repositories matching this topic...

natew
natew commented Sep 26, 2019

Haven't seen this reporter anywhere, tried out alpha 27 and with workerize-loader I get this:

TypeError: this.cache.get is not a function
    at /Users/nw/projects/motion/orbit/node_modules/webpack/lib/Compilation.js:2186:18
    at arrayEach (/Users/nw/projects/motion/orbit/node_modules/neo-async/async.js:2405:9)
    at Object.each (/Users/nw/projects/motion/orbit/node_modules/neo-async
thegrandpoobah
thegrandpoobah commented Nov 15, 2016

The documentation for imports-loader has a case for injecting a variable with a JS Object literal as follows:

import?config=>{size:50}

This works great, but once you try to add another property to this JS object in (what I considered to be) the obvious way:

import?config=>{size:50,color:2}

The imports-loader (indirectly via loaders-util) tokenizes on the comma and starts doing.

liamwang
liamwang commented Jul 28, 2017

Automatically add class name to <svg> tag from its svg file name.

What does the proposed API look like?

A file named logo.svg :

<svg class="foo" viewBox="0 0 25 25">
    <path d="..."/>
</svg>

The options :

  {
    test: /\.svg$/,
    loader: 'svg-inline-loader',
    options: {
      className: 'icon-[filename]',
      // or
      // classPrefix: 'icon
edgarshurtado
edgarshurtado commented Jan 22, 2020

Hi,

I'd like to contribute to improving the documentation for this great plugin.

It's only a detail but I haven't been able to find in the docs that if some sizes are set like [300, 600, 1200], the first one will be the one used for src attribute. So in my case, IE was using the 300px image instead of the bigger one. To fix this I had just to put 1200 as the first array element.

Could

AtofStryker
AtofStryker commented Feb 7, 2020

My team and I ran into a production issue where we were not passing the results of vue-svg-loader to babel-loader. This caused a production issue with IE11. After reading the documentation a bit more carefully, it looks like babel-loader is implicitly used throughout to docs.

Would there be a benefit to adding a brief snippet of documentation stating that the loader requires babel to be

Improve this page

Add a description, image, and links to the webpack-loader topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the webpack-loader topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.