webpack/examples/persistent-caching
Tobias Koppers 1b402bcae1 Merge tag 'v4.28.0' into next
4.28.0
2018-12-19 14:05:17 +01:00
..
README.md Merge tag 'v4.28.0' into next 2018-12-19 14:05:17 +01:00
build.js add persistent caching prototype 2018-10-17 21:25:39 +02:00
example.js add persistent caching prototype 2018-10-17 21:25:39 +02:00
template.md add persistent caching prototype 2018-10-17 21:25:39 +02:00
webpack.config.js improve loglevel option 2018-10-17 21:25:41 +02:00

README.md

example.js

console.log(process.env.NODE_ENV);

import "react";
import "react-dom";
import "acorn";
import "core-js";
import "date-fns";

webpack.config.js

const path = require("path");
module.exports = (env = "development") => ({
	mode: env,
	cache: {
		type: "filesystem",
		cacheDirectory: path.resolve(__dirname, ".cache"),
		loglevel: "warning"
	}
});

Info

Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 5.0.0-next
    Asset      Size  Chunks             Chunk Names
output.js  1.51 MiB     {0}  [emitted]  main
Entrypoint main = output.js
chunk {0} output.js (main) 1.22 MiB (javascript) 888 bytes (runtime) [entry]
    > .\example.js main
    686 chunk modules