rap2hpoutre / vue-picture-swipe

🖼 Vue Picture Swipe Gallery (a gallery of image with thumbnails, lazy-load and swipe) backed by photoswipe
MIT License
395 stars 50 forks source link

Webpack 4, mini-css-extract-plugin and Material Icons #15

Closed pixelated-au closed 5 years ago

pixelated-au commented 6 years ago

Hi, it appears that the mini-css-extract-plugin as recommended when using Webpack 4 doesn't support remote requests. As such the line 318 VuePictureSwipe.vue @import "https://fonts.googleapis.com/icon?family=Material+Icons"; creates an error Unexpected format https://fonts.googleapis.com/icon?family=Material+Icons

The only way to rectify it is to copy/paste the code from the remote URL in place of that line:

/* fallback */
@font-face {
  font-family: 'Material Icons';
  font-style: normal;
  font-weight: 400;
  src: url(https://fonts.gstatic.com/s/materialicons/v41/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.woff2) format('woff2');
}

.material-icons {
  font-family: 'Material Icons';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -moz-font-feature-settings: 'liga';
  -moz-osx-font-smoothing: grayscale;
}
rap2hpoutre commented 6 years ago

Hi, thank you for your contribution. I did not know about remote request. Feel free to submit a pull request with the fallback you copy/pasted (I could do it myself if you prefer).

rap2hpoutre commented 5 years ago

Thank you @AndrewDavis !