te')); return $arr; } /* 遍历用户所有主题 * @param $uid 用户ID * @param int $page 页数 * @param int $pagesize 每页记录条数 * @param bool $desc 排序方式 TRUE降序 FALSE升序 * @param string $key 返回的数组用那一列的值作为 key * @param array $col 查询哪些列 */ function thread_tid_find_by_uid($uid, $page = 1, $pagesize = 1000, $desc = TRUE, $key = 'tid', $col = array()) { if (empty($uid)) return array(); $orderby = TRUE == $desc ? -1 : 1; $arr = thread_tid__find($cond = array('uid' => $uid), array('tid' => $orderby), $page, $pagesize, $key, $col); return $arr; } // 遍历栏目下tid 支持数组 $fid = array(1,2,3) function thread_tid_find_by_fid($fid, $page = 1, $pagesize = 1000, $desc = TRUE) { if (empty($fid)) return array(); $orderby = TRUE == $desc ? -1 : 1; $arr = thread_tid__find($cond = array('fid' => $fid), array('tid' => $orderby), $page, $pagesize, 'tid', array('tid', 'verify_date')); return $arr; } function thread_tid_delete($tid) { if (empty($tid)) return FALSE; $r = thread_tid__delete(array('tid' => $tid)); return $r; } function thread_tid_count() { $n = thread_tid__count(); return $n; } // 统计用户主题数 大数量下严谨使用非主键统计 function thread_uid_count($uid) { $n = thread_tid__count(array('uid' => $uid)); return $n; } // 统计栏目主题数 大数量下严谨使用非主键统计 function thread_fid_count($fid) { $n = thread_tid__count(array('fid' => $fid)); return $n; } ?>javascript - webpack 3 DeprecationWarning: Chunk.modules is deprecated - Stack Overflow
最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - webpack 3 DeprecationWarning: Chunk.modules is deprecated - Stack Overflow

programmeradmin5浏览0评论

I am getting this warning

(node:4692) DeprecationWarning: Chunk.modules is deprecated. Use Chunk.getNumberOfModules/mapModules/forEachModule/containsModule instead

after upgrade from webpack v2.6.1 to v3. In v2xx, works fine but the v3 gives me this error.

I don't know which package causing the issue. Any references or link might be helpful.

my package.json file:

{
  "name": "app",
  "version": "1.0.0",
  "description": "app",
  "scripts": {
    "start": "webpack-dev-server --hot --inline --progress --colors  --port 2000"
  },
  "license": "MIT",
  "dependencies": {
    "@angular/animations": "~4.2.4",
    "@angular/mon": "~4.2.4",
    "@angular/piler": "~4.2.4",
    "@angular/core": "~4.2.4",
    "@angular/forms": "~4.2.4",
    "@angular/http": "~4.2.4",
    "@angular/material": "~2.0.0-beta.7",
    "@angular/platform-browser": "~4.2.4",
    "@angular/platform-browser-dynamic": "~4.2.4",
    "@angular/router": "~4.2.4",
    "core-js": "~2.4.1",
    "hammerjs": "~2.0.8",
    "rxjs": "~5.4.1",
    "zone.js": "~0.8.12"
  },
  "devDependencies": {
    "@angular/piler-cli": "~4.2.4",
    "@angular/platform-server": "~4.2.4",
    "@ngtools/webpack": "~1.4.1",
    "@types/jquery": "^2.0.43",
    "@types/node": "~8.0.0",
    "@types/typeahead": "~0.11.29",
    "angular2-router-loader": "~0.3.5",
    "angular2-template-loader": "~0.6.2",
    "awesome-typescript-loader": "~3.1.3",
    "chunk-manifest-webpack2-plugin": "~1.0.1",
    "pression-webpack-plugin": "~0.4.0",
    "css-loader": "~0.14.0",
    "extract-text-webpack-plugin": "^3.0.0-beta.3",
    "file-loader": "~0.11.2",
    "html-loader": "~0.4.5",
    "html-webpack-plugin": "~2.28.0",
    "imports-loader": "^0.7.1",
    "moment": "^2.18.1",
    "null-loader": "~0.1.1",
    "raw-loader": "~0.5.1",
    "rimraf": "~2.6.1",
    "split-by-name-webpack-plugin": "~0.0.3",
    "style-loader": "~0.18.2",
    "tslint": "~5.4.3",
    "typescript": "~2.3.4",
    "uglify-js": "^3.0.19",
    "uglify-loader": "~2.0.0",
    "uglifyjs-webpack-plugin": "^0.4.6",
    "webpack": "~3.0.0",
    "webpack-bundle-analyzer": "~2.8.2",
    "webpack-chunk-hash": "~0.4.0",
    "webpack-dev-server": "~2.5.0",
    "webpack-merge": "~4.1.0",
    "webpack-uglify-parallel": "~0.1.3"
  }
}

I am getting this warning

(node:4692) DeprecationWarning: Chunk.modules is deprecated. Use Chunk.getNumberOfModules/mapModules/forEachModule/containsModule instead

after upgrade from webpack v2.6.1 to v3. In v2xx, works fine but the v3 gives me this error.

I don't know which package causing the issue. Any references or link might be helpful.

my package.json file:

{
  "name": "app",
  "version": "1.0.0",
  "description": "app",
  "scripts": {
    "start": "webpack-dev-server --hot --inline --progress --colors  --port 2000"
  },
  "license": "MIT",
  "dependencies": {
    "@angular/animations": "~4.2.4",
    "@angular/mon": "~4.2.4",
    "@angular/piler": "~4.2.4",
    "@angular/core": "~4.2.4",
    "@angular/forms": "~4.2.4",
    "@angular/http": "~4.2.4",
    "@angular/material": "~2.0.0-beta.7",
    "@angular/platform-browser": "~4.2.4",
    "@angular/platform-browser-dynamic": "~4.2.4",
    "@angular/router": "~4.2.4",
    "core-js": "~2.4.1",
    "hammerjs": "~2.0.8",
    "rxjs": "~5.4.1",
    "zone.js": "~0.8.12"
  },
  "devDependencies": {
    "@angular/piler-cli": "~4.2.4",
    "@angular/platform-server": "~4.2.4",
    "@ngtools/webpack": "~1.4.1",
    "@types/jquery": "^2.0.43",
    "@types/node": "~8.0.0",
    "@types/typeahead": "~0.11.29",
    "angular2-router-loader": "~0.3.5",
    "angular2-template-loader": "~0.6.2",
    "awesome-typescript-loader": "~3.1.3",
    "chunk-manifest-webpack2-plugin": "~1.0.1",
    "pression-webpack-plugin": "~0.4.0",
    "css-loader": "~0.14.0",
    "extract-text-webpack-plugin": "^3.0.0-beta.3",
    "file-loader": "~0.11.2",
    "html-loader": "~0.4.5",
    "html-webpack-plugin": "~2.28.0",
    "imports-loader": "^0.7.1",
    "moment": "^2.18.1",
    "null-loader": "~0.1.1",
    "raw-loader": "~0.5.1",
    "rimraf": "~2.6.1",
    "split-by-name-webpack-plugin": "~0.0.3",
    "style-loader": "~0.18.2",
    "tslint": "~5.4.3",
    "typescript": "~2.3.4",
    "uglify-js": "^3.0.19",
    "uglify-loader": "~2.0.0",
    "uglifyjs-webpack-plugin": "^0.4.6",
    "webpack": "~3.0.0",
    "webpack-bundle-analyzer": "~2.8.2",
    "webpack-chunk-hash": "~0.4.0",
    "webpack-dev-server": "~2.5.0",
    "webpack-merge": "~4.1.0",
    "webpack-uglify-parallel": "~0.1.3"
  }
}
Share Improve this question edited Oct 11, 2017 at 8:59 Peyman Mohamadpour 18k24 gold badges92 silver badges101 bronze badges asked Jun 24, 2017 at 5:25 RobinRobin 6258 silver badges28 bronze badges
Add a ment  | 

3 Answers 3

Reset to default 8

I was getting the deprecated warning in the extract-text-webpack-plugin 3.0.0-beta.3. After I update the extract-text-webpack-plugin to v3.0.2 followed by this link DeprecationWarning Chunk.modules in Webpack 3.x, the warning is gone and Webpack v3xx is working without any error for me.

webpack

v3.8.1

extract-text-webpack-plugin

v3.0.2

Looks to be extract-text-webpack-plugin, see related issue here: https://github./webpack-contrib/extract-text-webpack-plugin/issues/529

Swapping from "webpack-md5-hash": "0.0.5",

to

"webpack-chunk-hash": "0.5.0"

Fixed the warning for me. The new package is a fork of the old one.

发布评论

评论列表(0)

  1. 暂无评论