-
Notifications
You must be signed in to change notification settings - Fork 0
/
preact.config.js
34 lines (29 loc) · 926 Bytes
/
preact.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import criticalCssPlugin from "preact-cli-plugin-critical-css";
import asyncPlugin from "preact-cli-plugin-fast-async";
// import Jarvis from "webpack-jarvis";
/* the rest of your webpack configs */
// const preactCliSwPrecachePlugin = require("preact-cli-sw-precache");
export default (config, env, helpers) => {
const options = {
width: 360,
height: 640
};
// console.log("CONFIG", JSON.stringify(config));
// console.log("ENV", JSON.stringify(env));
asyncPlugin(config);
criticalCssPlugin(config, env, options);
// const precacheConfig = {
// staticFileGlobs: [
// 'app/css/**.css',
// 'app/**.html',
// 'app/images/**.*',
// 'app/js/**.js'
// ],
// stripPrefix: 'app/',
// runtimeCaching: [{
// urlPattern: /this\\.is\\.a\\.regex/,
// handler: 'networkFirst'
// }]
// };
// return preactCliSwPrecachePlugin(config, precacheConfig);
};