Giter VIP home page Giter VIP logo

Comments (5)

ifengkou avatar ifengkou commented on July 18, 2024

是按照 入口js文件 按需加载资源的,如果index.css 没有被require,那么它就不会被编译到dist 目录中去。image除了在css中用,也可以直接在js里面require('image.png'),这样图片就会被打包编译。不知道我这样理解对不 😄

from webpack-template.

johnsoncheg avatar johnsoncheg commented on July 18, 2024

前面找到解决办法了,把img loaders里一句 'image?{bypassOnDebug:true, progressive:true,optimizationLevel:3,pngquant:{quality:"65-80",speed:4}}'注释掉就正常了

from webpack-template.

ifengkou avatar ifengkou commented on July 18, 2024

这个不需要注释,你 pull 下 package.json 这个文件,里面有个image-webpack-loader 忘了加上了

from webpack-template.

ifengkou avatar ifengkou commented on July 18, 2024

image?{bypassOnDebug:true, progressive:true,optimizationLevel:3,pngquant:{quality:"65-80",speed:4}}
是用来压缩大图片的。 具体可以参看https://github.com/tcoopman/image-webpack-loader

from webpack-template.

johnsoncheg avatar johnsoncheg commented on July 18, 2024

好的

from webpack-template.

Related Issues (6)

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.