Giter Site home page Giter Site logo

Comments (11)

weijhfly avatar weijhfly commented on May 25, 2024

我的也是,20个页面左右,修改后要8秒左右才能编译完成,如果有解决办法求告知

from webpack-multiple-entry.

givebest avatar givebest commented on May 25, 2024

@bluekevin @weijhfly 不介意的话把你们项目发我一份看看

from webpack-multiple-entry.

weijhfly avatar weijhfly commented on May 25, 2024

没有怎么用过webpack,但听说7、8秒是很快的,是不是不需要解决了

from webpack-multiple-entry.

givebest avatar givebest commented on May 25, 2024

@weijhfly 好吧,应该是有优化的空间

from webpack-multiple-entry.

weijhfly avatar weijhfly commented on May 25, 2024

@givebest 这个问题确实普遍存在,可以看这里的讨论jantimon/html-webpack-plugin#724,只要页面一多起来,html-webpack-plugin就处理得很慢,我试过html-webpack-plugin1.7.0版本,几十个页面编译时间只有3秒左右,但似乎不支持art-template,html-webpack-plugin插件似乎也没有官方的解决办法,不知您可否看看有没有可靠的解决办法呢

from webpack-multiple-entry.

givebest avatar givebest commented on May 25, 2024

@weijhfly

"devDependencies": {
    "art-template-loader": "^1.4.3",
    "autoprefixer": "^7.1.2",
    "babel-core": "^6.25.0",
    "babel-loader": "^7.0.0",
    "babel-preset-env": "^1.5.2",
    "better-npm-run": "^0.0.15",
    "copy-webpack-plugin": "^4.0.1",
    "cross-env": "^5.0.1",
    "css-loader": "^0.28.4",
    "extract-text-webpack-plugin": "^3.0.0",
    "file-loader": "^0.11.2",
    "glob": "^7.1.2",
    "happypack": "^4.0.1",
    "html-webpack-plugin": "^2.30.1",
    "image-webpack-loader": "^3.3.1",
    "jquery": "^1.12.4",
    "less": "^2.7.2",
    "less-loader": "^4.0.4",
    "postcss-loader": "^2.0.5",
    "style-loader": "^0.18.2",
    "url-loader": "^0.5.9",
    "webpack": "^3.12.0",
    "webpack-bundle-analyzer": "^2.9.0",
    "webpack-dev-server": "^2.11.2"
  },
  "dependencies": {
    "art-template": "^4.12.1"
  }

我试着把一些插件升级了一下,没有出现兼容问题,开发环境把 minChunks 改大一些效果更佳 :)

from webpack-multiple-entry.

weijhfly avatar weijhfly commented on May 25, 2024

一般中等的项目会有50左右页面,大一点的100左右,不知道效率有没有提升,最好是在10秒内编译完成吧,有时间我试试

from webpack-multiple-entry.

weijhfly avatar weijhfly commented on May 25, 2024

非常感谢,问题已解决

from webpack-multiple-entry.

jlcool avatar jlcool commented on May 25, 2024

@weijhfly 你咋解决的

from webpack-multiple-entry.

givebest avatar givebest commented on May 25, 2024

@bluekevin @jlcool @weijhfly 这个问题可以确定是图片压缩的锅,可暂时注释掉图片压缩来解决。后面我会更新 webpack.config 文件开发环境不再压缩图片。

from webpack-multiple-entry.

givebest avatar givebest commented on May 25, 2024

@bluekevin @jlcool @weijhfly 已更新为开发时不压缩图片,本地项目测试已大大提升热更新效率 5d4371b

from webpack-multiple-entry.

Related Issues (4)

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.