@qingtian/qtcli 1.0.9-beta.4 → 1.0.9-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -81,6 +81,20 @@ var config = {
81
81
  clean: true,
82
82
  publicPath: '/',
83
83
  },
84
+ // Webpack 5 持久化缓存:二次构建速度提升 60-80%
85
+ cache: {
86
+ type: 'filesystem',
87
+ cacheDirectory: path.resolve(process.cwd(), 'node_modules/.cache/webpack'),
88
+ buildDependencies: {
89
+ // 当这些文件变化时,缓存自动失效
90
+ config: [
91
+ __filename,
92
+ path.resolve(process.cwd(), 'qt.conf.js'),
93
+ ].filter(function (f) { return fs.existsSync(f); }),
94
+ },
95
+ // 用 NODE_ENV 区分 dev / prod 缓存,避免互相污染
96
+ name: "".concat(process.env.NODE_ENV || 'development', "-cache"),
97
+ },
84
98
  module: {
85
99
  rules: [
86
100
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qingtian/qtcli",
3
- "version": "1.0.9-beta.4",
3
+ "version": "1.0.9-beta.5",
4
4
  "description": "QTCli是一款基于node的前端工程化底座",
5
5
  "homepage": "https://gitee.com/fengrengame/qtnode#readme",
6
6
  "bugs": {