webpack/examples/persistent-caching
Tobias Koppers a852828279 add persistent caching prototype 2018-10-17 21:25:39 +02:00
..
README.md add persistent caching prototype 2018-10-17 21:25:39 +02: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 add persistent caching prototype 2018-10-17 21:25:39 +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",
		name: env,
		cacheDirectory: path.resolve(__dirname, ".cache"),
		warn: true
	}
});

Info

Hash: 0a1b2c3d4e5f6a7b8c9d
Version: webpack 5.0.0-next
    Asset      Size  Chunks             Chunk Names
output.js  1.34 MiB       0  [emitted]  main
Entrypoint main = output.js
chunk    {0} output.js (main) 1.19 MiB [entry]
    > .\example.js main
    670 modules