title: How to add jquery-ui css/images with webpack
body: <p>I am using jquery-ui together with webpack but have problems regarding how to load the bundled css and images from node_modules folder.</p>
  
  <p>I have my own scss files but then also need to load the jquery-ui css. To acomplish this I added the following webpack config rules.</p>
  
  <pre><code>{
      test: /\.scss$/,
      include: [
          path.resolve(__dirname, "client/css/scss"),
      ],
      use: [{
          loader: "style-loader" // creates style nodes from JS strings
      }, {
          loader: "css-loader" // translates CSS into CommonJS
      }, {
          loader: "sass-loader" // compiles Sass to CSS
      }]
  },
  {
      test: /all\.css$/,
      include: [
          path.resolve(__dirname, "node_modules/jquery-ui/themes/base"),
      ],
      use: [{
          loader: "style-loader" // creates style nodes from JS strings
      }, {
          loader: "css-loader" // translates CSS into CommonJS
      }]
  }
  </code></pre>
  
  <p>Note versions:</p>
  
  <pre><code>"jquery": "3.2.1",
  "jquery-ui": "1.12.1",
  </code></pre>
  
  <p>Next in my js entry file:</p>
  
  <pre><code>require("../css/scss/main.scss");
  require("../../node_modules/jquery-ui/themes/base/all.css");
  </code></pre>
  
  <p>However on build this gives:</p>
  
  <blockquote>
    <p>ERROR in
    ./node_modules/jquery-ui/themes/base/images/ui-icons_777620_256x240.png
    Module parse failed:
    /home/anders/Code/imjustworking/node_modules/jquery-ui/themes/base/images/ui-icons_777620_256x240.png
    Unexpected character '�' (1:0)</p>
  </blockquote>
  
  <p>So I figured I need some additional loaders for pngs:
  {
          test: /.png$/,
          include: [
              path.resolve(__dirname, "node_modules/jquery-ui/themes/base/images"),
          ],
          use: {
              loader: "url-loader?limit=100000"
          }
      }
  But then I run into this policy I would rather not change:</p>
  
  <blockquote>
    <p>Refused to load the image
    'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAADwCAMAAADYSUr5AAABDlBMV…MDrH4y9V+CDsjWf1nOApn6L+F1gNV/F48BB4BR+zUwcIfzP/8S/ZOlvFfuAAAAAElFTkSuQmCC'
    because it violates the following Content Security Policy directive:
    "img-src 'self'".</p>
  </blockquote>
  
  <p>This is where Im at now. I did find some other examples of how to do this but they where mostly from earlier less webpack friendly versions of jquery-ui. Any advice appreciated. I suspect there are better ways to do this than my attemptemts above?</p>