gatsby 5.3.2 → 5.3.3

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.
@@ -22,12 +22,16 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
22
22
 
23
23
  var _bundleWebpack = require("./bundle-webpack");
24
24
 
25
+ var _bundleWebpack2 = require("./../../utils/page-ssr-module/bundle-webpack");
26
+
25
27
  var _reporter = _interopRequireDefault(require("gatsby-cli/lib/reporter"));
26
28
 
27
29
  var _loadConfigAndPlugins = require("../../utils/worker/child/load-config-and-plugins");
28
30
 
29
31
  var fs = _interopRequireWildcard(require("fs-extra"));
30
32
 
33
+ var _redux = require("../../redux");
34
+
31
35
  var _validateEngines = require("../../utils/validate-engines");
32
36
 
33
37
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -45,15 +49,26 @@ async function run() {
45
49
  console.log(`clearing webpack cache\n\n`); // get rid of cache if it exist
46
50
 
47
51
  await fs.remove(process.cwd() + `/.cache/webpack/query-engine`);
52
+ await fs.remove(process.cwd() + `/.cache/webpack/page-ssr`);
48
53
  } catch (e) {// eslint-disable no-empty
49
- } // recompile
54
+ }
55
+
56
+ const state = _redux.store.getState(); // recompile
50
57
 
51
58
 
52
59
  const buildActivityTimer = _reporter.default.activityTimer(`Building Rendering Engines`);
53
60
 
54
61
  try {
55
62
  buildActivityTimer.start();
56
- await (0, _bundleWebpack.createGraphqlEngineBundle)(process.cwd(), _reporter.default, true);
63
+ await Promise.all([(0, _bundleWebpack.createGraphqlEngineBundle)(process.cwd(), _reporter.default, true), (0, _bundleWebpack2.createPageSSRBundle)({
64
+ rootDir: process.cwd(),
65
+ components: _redux.store.getState().components,
66
+ staticQueriesByTemplate: state.staticQueriesByTemplate,
67
+ webpackCompilationHash: state.webpackCompilationHash,
68
+ // we set webpackCompilationHash above
69
+ reporter: _reporter.default,
70
+ isVerbose: state.program.verbose
71
+ })]);
57
72
  } catch (err) {
58
73
  buildActivityTimer.panic(err);
59
74
  } finally {
@@ -1 +1 @@
1
- {"version":3,"file":"standalone-regenerate.js","names":["run","console","log","loadConfigAndPlugins","siteDirectory","process","cwd","fs","remove","e","buildActivityTimer","reporter","activityTimer","start","createGraphqlEngineBundle","err","panic","end","validateEnginesActivity","validateEngines","error","id","context"],"sources":["../../../src/schema/graphql-engine/standalone-regenerate.ts"],"sourcesContent":["#!/usr/bin/env node\n\n/*\nthis is used for development purposes only\nto be able to run `gatsby build` once to source data\nand print schema and then just rebundle graphql-engine\nwith source file changes and test re-built engine quickly\n\nUsage:\nThere need to be at least one successful `gatsby build`\nbefore starting to use this script (warm up datastore,\ngenerate \"page-ssr\" bundle). Once that's done you can\nrun following command in test site directory:\n\n```shell\nnode node_modules/gatsby/dist/schema/graphql-engine/standalone-regenerate.js\n```\n*/\n\nimport { createGraphqlEngineBundle } from \"./bundle-webpack\"\nimport reporter from \"gatsby-cli/lib/reporter\"\nimport { loadConfigAndPlugins } from \"../../utils/worker/child/load-config-and-plugins\"\nimport * as fs from \"fs-extra\"\nimport { validateEngines } from \"../../utils/validate-engines\"\n\nasync function run(): Promise<void> {\n // load config\n console.log(`loading config and plugins`)\n await loadConfigAndPlugins({\n siteDirectory: process.cwd(),\n })\n\n try {\n console.log(`clearing webpack cache\\n\\n`)\n // get rid of cache if it exist\n await fs.remove(process.cwd() + `/.cache/webpack/query-engine`)\n } catch (e) {\n // eslint-disable no-empty\n }\n\n // recompile\n const buildActivityTimer = reporter.activityTimer(\n `Building Rendering Engines`\n )\n try {\n buildActivityTimer.start()\n await createGraphqlEngineBundle(process.cwd(), reporter, true)\n } catch (err) {\n buildActivityTimer.panic(err)\n } finally {\n buildActivityTimer.end()\n }\n\n // validate\n const validateEnginesActivity = reporter.activityTimer(\n `Validating Rendering Engines`\n )\n validateEnginesActivity.start()\n try {\n await validateEngines(process.cwd())\n } catch (error) {\n validateEnginesActivity.panic({ id: `98001`, context: {}, error })\n } finally {\n validateEnginesActivity.end()\n }\n\n console.log(`DONE`)\n}\n\nrun()\n"],"mappings":"AAAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,eAAeA,GAAf,GAAoC;EAClC;EACAC,OAAO,CAACC,GAAR,CAAa,4BAAb;EACA,MAAM,IAAAC,0CAAA,EAAqB;IACzBC,aAAa,EAAEC,OAAO,CAACC,GAAR;EADU,CAArB,CAAN;;EAIA,IAAI;IACFL,OAAO,CAACC,GAAR,CAAa,4BAAb,EADE,CAEF;;IACA,MAAMK,EAAE,CAACC,MAAH,CAAUH,OAAO,CAACC,GAAR,KAAiB,8BAA3B,CAAN;EACD,CAJD,CAIE,OAAOG,CAAP,EAAU,CACV;EACD,CAbiC,CAelC;;;EACA,MAAMC,kBAAkB,GAAGC,iBAAA,CAASC,aAAT,CACxB,4BADwB,CAA3B;;EAGA,IAAI;IACFF,kBAAkB,CAACG,KAAnB;IACA,MAAM,IAAAC,wCAAA,EAA0BT,OAAO,CAACC,GAAR,EAA1B,EAAyCK,iBAAzC,EAAmD,IAAnD,CAAN;EACD,CAHD,CAGE,OAAOI,GAAP,EAAY;IACZL,kBAAkB,CAACM,KAAnB,CAAyBD,GAAzB;EACD,CALD,SAKU;IACRL,kBAAkB,CAACO,GAAnB;EACD,CA1BiC,CA4BlC;;;EACA,MAAMC,uBAAuB,GAAGP,iBAAA,CAASC,aAAT,CAC7B,8BAD6B,CAAhC;;EAGAM,uBAAuB,CAACL,KAAxB;;EACA,IAAI;IACF,MAAM,IAAAM,gCAAA,EAAgBd,OAAO,CAACC,GAAR,EAAhB,CAAN;EACD,CAFD,CAEE,OAAOc,KAAP,EAAc;IACdF,uBAAuB,CAACF,KAAxB,CAA8B;MAAEK,EAAE,EAAG,OAAP;MAAeC,OAAO,EAAE,EAAxB;MAA4BF;IAA5B,CAA9B;EACD,CAJD,SAIU;IACRF,uBAAuB,CAACD,GAAxB;EACD;;EAEDhB,OAAO,CAACC,GAAR,CAAa,MAAb;AACD;;AAEDF,GAAG"}
1
+ {"version":3,"file":"standalone-regenerate.js","names":["run","console","log","loadConfigAndPlugins","siteDirectory","process","cwd","fs","remove","e","state","store","getState","buildActivityTimer","reporter","activityTimer","start","Promise","all","createGraphqlEngineBundle","createPageSSRBundle","rootDir","components","staticQueriesByTemplate","webpackCompilationHash","isVerbose","program","verbose","err","panic","end","validateEnginesActivity","validateEngines","error","id","context"],"sources":["../../../src/schema/graphql-engine/standalone-regenerate.ts"],"sourcesContent":["#!/usr/bin/env node\n\n/*\nthis is used for development purposes only\nto be able to run `gatsby build` once to source data\nand print schema and then just rebundle graphql-engine\nwith source file changes and test re-built engine quickly\n\nUsage:\nThere need to be at least one successful `gatsby build`\nbefore starting to use this script (warm up datastore,\ngenerate \"page-ssr\" bundle). Once that's done you can\nrun following command in test site directory:\n\n```shell\nnode node_modules/gatsby/dist/schema/graphql-engine/standalone-regenerate.js\n```\n*/\n\nimport { createGraphqlEngineBundle } from \"./bundle-webpack\"\nimport { createPageSSRBundle } from \"./../../utils/page-ssr-module/bundle-webpack\"\nimport reporter from \"gatsby-cli/lib/reporter\"\nimport { loadConfigAndPlugins } from \"../../utils/worker/child/load-config-and-plugins\"\nimport * as fs from \"fs-extra\"\nimport { store } from \"../../redux\"\nimport { validateEngines } from \"../../utils/validate-engines\"\n\nasync function run(): Promise<void> {\n // load config\n console.log(`loading config and plugins`)\n await loadConfigAndPlugins({\n siteDirectory: process.cwd(),\n })\n\n try {\n console.log(`clearing webpack cache\\n\\n`)\n // get rid of cache if it exist\n await fs.remove(process.cwd() + `/.cache/webpack/query-engine`)\n await fs.remove(process.cwd() + `/.cache/webpack/page-ssr`)\n } catch (e) {\n // eslint-disable no-empty\n }\n\n const state = store.getState()\n\n // recompile\n const buildActivityTimer = reporter.activityTimer(\n `Building Rendering Engines`\n )\n try {\n buildActivityTimer.start()\n await Promise.all([\n createGraphqlEngineBundle(process.cwd(), reporter, true),\n createPageSSRBundle({\n rootDir: process.cwd(),\n components: store.getState().components,\n staticQueriesByTemplate: state.staticQueriesByTemplate,\n webpackCompilationHash: state.webpackCompilationHash, // we set webpackCompilationHash above\n reporter,\n isVerbose: state.program.verbose,\n }),\n ])\n } catch (err) {\n buildActivityTimer.panic(err)\n } finally {\n buildActivityTimer.end()\n }\n\n // validate\n const validateEnginesActivity = reporter.activityTimer(\n `Validating Rendering Engines`\n )\n validateEnginesActivity.start()\n try {\n await validateEngines(process.cwd())\n } catch (error) {\n validateEnginesActivity.panic({ id: `98001`, context: {}, error })\n } finally {\n validateEnginesActivity.end()\n }\n\n console.log(`DONE`)\n}\n\nrun()\n"],"mappings":"AAAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,eAAeA,GAAf,GAAoC;EAClC;EACAC,OAAO,CAACC,GAAR,CAAa,4BAAb;EACA,MAAM,IAAAC,0CAAA,EAAqB;IACzBC,aAAa,EAAEC,OAAO,CAACC,GAAR;EADU,CAArB,CAAN;;EAIA,IAAI;IACFL,OAAO,CAACC,GAAR,CAAa,4BAAb,EADE,CAEF;;IACA,MAAMK,EAAE,CAACC,MAAH,CAAUH,OAAO,CAACC,GAAR,KAAiB,8BAA3B,CAAN;IACA,MAAMC,EAAE,CAACC,MAAH,CAAUH,OAAO,CAACC,GAAR,KAAiB,0BAA3B,CAAN;EACD,CALD,CAKE,OAAOG,CAAP,EAAU,CACV;EACD;;EAED,MAAMC,KAAK,GAAGC,YAAA,CAAMC,QAAN,EAAd,CAhBkC,CAkBlC;;;EACA,MAAMC,kBAAkB,GAAGC,iBAAA,CAASC,aAAT,CACxB,4BADwB,CAA3B;;EAGA,IAAI;IACFF,kBAAkB,CAACG,KAAnB;IACA,MAAMC,OAAO,CAACC,GAAR,CAAY,CAChB,IAAAC,wCAAA,EAA0Bd,OAAO,CAACC,GAAR,EAA1B,EAAyCQ,iBAAzC,EAAmD,IAAnD,CADgB,EAEhB,IAAAM,mCAAA,EAAoB;MAClBC,OAAO,EAAEhB,OAAO,CAACC,GAAR,EADS;MAElBgB,UAAU,EAAEX,YAAA,CAAMC,QAAN,GAAiBU,UAFX;MAGlBC,uBAAuB,EAAEb,KAAK,CAACa,uBAHb;MAIlBC,sBAAsB,EAAEd,KAAK,CAACc,sBAJZ;MAIoC;MACtDV,QAAQ,EAARA,iBALkB;MAMlBW,SAAS,EAAEf,KAAK,CAACgB,OAAN,CAAcC;IANP,CAApB,CAFgB,CAAZ,CAAN;EAWD,CAbD,CAaE,OAAOC,GAAP,EAAY;IACZf,kBAAkB,CAACgB,KAAnB,CAAyBD,GAAzB;EACD,CAfD,SAeU;IACRf,kBAAkB,CAACiB,GAAnB;EACD,CAvCiC,CAyClC;;;EACA,MAAMC,uBAAuB,GAAGjB,iBAAA,CAASC,aAAT,CAC7B,8BAD6B,CAAhC;;EAGAgB,uBAAuB,CAACf,KAAxB;;EACA,IAAI;IACF,MAAM,IAAAgB,gCAAA,EAAgB3B,OAAO,CAACC,GAAR,EAAhB,CAAN;EACD,CAFD,CAEE,OAAO2B,KAAP,EAAc;IACdF,uBAAuB,CAACF,KAAxB,CAA8B;MAAEK,EAAE,EAAG,OAAP;MAAeC,OAAO,EAAE,EAAxB;MAA4BF;IAA5B,CAA9B;EACD,CAJD,SAIU;IACRF,uBAAuB,CAACD,GAAxB;EACD;;EAED7B,OAAO,CAACC,GAAR,CAAa,MAAb;AACD;;AAEDF,GAAG"}
@@ -29,8 +29,10 @@ const webpackRemoveExportsLoader = function webpackRemoveExportsLoader(source, s
29
29
  }, (err, result) => {
30
30
  if (err) {
31
31
  callback(err);
32
- } else if (result && result.code && result.map) {
33
- callback(null, result === null || result === void 0 ? void 0 : result.code, result === null || result === void 0 ? void 0 : result.map);
32
+ } else if (result && result.code) {
33
+ var _result$map;
34
+
35
+ callback(null, result === null || result === void 0 ? void 0 : result.code, (_result$map = result === null || result === void 0 ? void 0 : result.map) !== null && _result$map !== void 0 ? _result$map : undefined);
34
36
  } else {
35
37
  callback(null, source, sourceMap);
36
38
  }
@@ -1 +1 @@
1
- {"version":3,"file":"webpack-remove-exports-loader.js","names":["webpackRemoveExportsLoader","source","sourceMap","callback","async","options","getOptions","transform","babelrc","configFile","inputSourceMap","undefined","sourceFileName","resourcePath","sourceMaps","filename","presets","jsx","require","resolve","useBuiltIns","pragma","development","plugins","apis","remove","err","result","code","map","module","exports"],"sources":["../../../../src/utils/webpack/loaders/webpack-remove-exports-loader.ts"],"sourcesContent":["/* eslint-disable @babel/no-invalid-this */\n\nimport { LoaderDefinitionFunction } from \"webpack\"\nimport { transform } from \"@babel/core\"\n\ninterface IOptions {\n jsx?: boolean\n remove?: Array<string>\n}\n\nconst webpackRemoveExportsLoader: LoaderDefinitionFunction<IOptions> =\n function webpackRemoveExportsLoader(source, sourceMap): void {\n const callback = this.async()\n const options = this.getOptions()\n\n transform(\n source,\n {\n babelrc: false,\n configFile: false,\n // @ts-ignore inputSourceMap expect object or falsy, but webpack types suggest sourceMap can be a string,\n // which is not compatibile with babel's transform options\n inputSourceMap: this.sourceMap ? sourceMap || undefined : undefined,\n sourceFileName: this.resourcePath,\n sourceMaps: this.sourceMap,\n filename: this.resourcePath,\n presets: options?.jsx\n ? [\n [\n require.resolve(`babel-preset-gatsby/babel-preset-react`),\n {\n useBuiltIns: true,\n pragma: `React.createElement`,\n // jsx is used only in develop, so for now this is fine\n development: true,\n },\n ],\n ]\n : undefined,\n plugins: [\n [\n require.resolve(`../../babel/babel-plugin-remove-api`),\n {\n apis: options?.remove ?? [],\n },\n ],\n ],\n },\n (err, result) => {\n if (err) {\n callback(err)\n } else if (result && result.code && result.map) {\n callback(null, result?.code, result?.map)\n } else {\n callback(null, source, sourceMap)\n }\n }\n )\n }\n\nmodule.exports = webpackRemoveExportsLoader\n"],"mappings":";;AAGA;;AAHA;AAUA,MAAMA,0BAA8D,GAClE,SAASA,0BAAT,CAAoCC,MAApC,EAA4CC,SAA5C,EAA6D;EAAA;;EAC3D,MAAMC,QAAQ,GAAG,KAAKC,KAAL,EAAjB;EACA,MAAMC,OAAO,GAAG,KAAKC,UAAL,EAAhB;EAEA,IAAAC,eAAA,EACEN,MADF,EAEE;IACEO,OAAO,EAAE,KADX;IAEEC,UAAU,EAAE,KAFd;IAGE;IACA;IACAC,cAAc,EAAE,KAAKR,SAAL,GAAiBA,SAAS,IAAIS,SAA9B,GAA0CA,SAL5D;IAMEC,cAAc,EAAE,KAAKC,YANvB;IAOEC,UAAU,EAAE,KAAKZ,SAPnB;IAQEa,QAAQ,EAAE,KAAKF,YARjB;IASEG,OAAO,EAAEX,OAAO,SAAP,IAAAA,OAAO,WAAP,IAAAA,OAAO,CAAEY,GAAT,GACL,CACE,CACEC,OAAO,CAACC,OAAR,CAAiB,wCAAjB,CADF,EAEE;MACEC,WAAW,EAAE,IADf;MAEEC,MAAM,EAAG,qBAFX;MAGE;MACAC,WAAW,EAAE;IAJf,CAFF,CADF,CADK,GAYLX,SArBN;IAsBEY,OAAO,EAAE,CACP,CACEL,OAAO,CAACC,OAAR,CAAiB,qCAAjB,CADF,EAEE;MACEK,IAAI,qBAAEnB,OAAF,aAAEA,OAAF,uBAAEA,OAAO,CAAEoB,MAAX,6DAAqB;IAD3B,CAFF,CADO;EAtBX,CAFF,EAiCE,CAACC,GAAD,EAAMC,MAAN,KAAiB;IACf,IAAID,GAAJ,EAAS;MACPvB,QAAQ,CAACuB,GAAD,CAAR;IACD,CAFD,MAEO,IAAIC,MAAM,IAAIA,MAAM,CAACC,IAAjB,IAAyBD,MAAM,CAACE,GAApC,EAAyC;MAC9C1B,QAAQ,CAAC,IAAD,EAAOwB,MAAP,aAAOA,MAAP,uBAAOA,MAAM,CAAEC,IAAf,EAAqBD,MAArB,aAAqBA,MAArB,uBAAqBA,MAAM,CAAEE,GAA7B,CAAR;IACD,CAFM,MAEA;MACL1B,QAAQ,CAAC,IAAD,EAAOF,MAAP,EAAeC,SAAf,CAAR;IACD;EACF,CAzCH;AA2CD,CAhDH;;AAkDA4B,MAAM,CAACC,OAAP,GAAiB/B,0BAAjB"}
1
+ {"version":3,"file":"webpack-remove-exports-loader.js","names":["webpackRemoveExportsLoader","source","sourceMap","callback","async","options","getOptions","transform","babelrc","configFile","inputSourceMap","undefined","sourceFileName","resourcePath","sourceMaps","filename","presets","jsx","require","resolve","useBuiltIns","pragma","development","plugins","apis","remove","err","result","code","map","module","exports"],"sources":["../../../../src/utils/webpack/loaders/webpack-remove-exports-loader.ts"],"sourcesContent":["/* eslint-disable @babel/no-invalid-this */\n\nimport { LoaderDefinitionFunction } from \"webpack\"\nimport { transform } from \"@babel/core\"\n\ninterface IOptions {\n jsx?: boolean\n remove?: Array<string>\n}\n\nconst webpackRemoveExportsLoader: LoaderDefinitionFunction<IOptions> =\n function webpackRemoveExportsLoader(source, sourceMap): void {\n const callback = this.async()\n const options = this.getOptions()\n\n transform(\n source,\n {\n babelrc: false,\n configFile: false,\n // @ts-ignore inputSourceMap expect object or falsy, but webpack types suggest sourceMap can be a string,\n // which is not compatibile with babel's transform options\n inputSourceMap: this.sourceMap ? sourceMap || undefined : undefined,\n sourceFileName: this.resourcePath,\n sourceMaps: this.sourceMap,\n filename: this.resourcePath,\n presets: options?.jsx\n ? [\n [\n require.resolve(`babel-preset-gatsby/babel-preset-react`),\n {\n useBuiltIns: true,\n pragma: `React.createElement`,\n // jsx is used only in develop, so for now this is fine\n development: true,\n },\n ],\n ]\n : undefined,\n plugins: [\n [\n require.resolve(`../../babel/babel-plugin-remove-api`),\n {\n apis: options?.remove ?? [],\n },\n ],\n ],\n },\n (err, result) => {\n if (err) {\n callback(err)\n } else if (result && result.code) {\n callback(null, result?.code, result?.map ?? undefined)\n } else {\n callback(null, source, sourceMap)\n }\n }\n )\n }\n\nmodule.exports = webpackRemoveExportsLoader\n"],"mappings":";;AAGA;;AAHA;AAUA,MAAMA,0BAA8D,GAClE,SAASA,0BAAT,CAAoCC,MAApC,EAA4CC,SAA5C,EAA6D;EAAA;;EAC3D,MAAMC,QAAQ,GAAG,KAAKC,KAAL,EAAjB;EACA,MAAMC,OAAO,GAAG,KAAKC,UAAL,EAAhB;EAEA,IAAAC,eAAA,EACEN,MADF,EAEE;IACEO,OAAO,EAAE,KADX;IAEEC,UAAU,EAAE,KAFd;IAGE;IACA;IACAC,cAAc,EAAE,KAAKR,SAAL,GAAiBA,SAAS,IAAIS,SAA9B,GAA0CA,SAL5D;IAMEC,cAAc,EAAE,KAAKC,YANvB;IAOEC,UAAU,EAAE,KAAKZ,SAPnB;IAQEa,QAAQ,EAAE,KAAKF,YARjB;IASEG,OAAO,EAAEX,OAAO,SAAP,IAAAA,OAAO,WAAP,IAAAA,OAAO,CAAEY,GAAT,GACL,CACE,CACEC,OAAO,CAACC,OAAR,CAAiB,wCAAjB,CADF,EAEE;MACEC,WAAW,EAAE,IADf;MAEEC,MAAM,EAAG,qBAFX;MAGE;MACAC,WAAW,EAAE;IAJf,CAFF,CADF,CADK,GAYLX,SArBN;IAsBEY,OAAO,EAAE,CACP,CACEL,OAAO,CAACC,OAAR,CAAiB,qCAAjB,CADF,EAEE;MACEK,IAAI,qBAAEnB,OAAF,aAAEA,OAAF,uBAAEA,OAAO,CAAEoB,MAAX,6DAAqB;IAD3B,CAFF,CADO;EAtBX,CAFF,EAiCE,CAACC,GAAD,EAAMC,MAAN,KAAiB;IACf,IAAID,GAAJ,EAAS;MACPvB,QAAQ,CAACuB,GAAD,CAAR;IACD,CAFD,MAEO,IAAIC,MAAM,IAAIA,MAAM,CAACC,IAArB,EAA2B;MAAA;;MAChCzB,QAAQ,CAAC,IAAD,EAAOwB,MAAP,aAAOA,MAAP,uBAAOA,MAAM,CAAEC,IAAf,iBAAqBD,MAArB,aAAqBA,MAArB,uBAAqBA,MAAM,CAAEE,GAA7B,qDAAoClB,SAApC,CAAR;IACD,CAFM,MAEA;MACLR,QAAQ,CAAC,IAAD,EAAOF,MAAP,EAAeC,SAAf,CAAR;IACD;EACF,CAzCH;AA2CD,CAhDH;;AAkDA4B,MAAM,CAACC,OAAP,GAAiB/B,0BAAjB"}
@@ -37,6 +37,8 @@ var _eslintConfig = require("./eslint-config");
37
37
 
38
38
  var _redux = require("../redux");
39
39
 
40
+ var _constants = require("../constants");
41
+
40
42
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
41
43
 
42
44
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -78,6 +80,18 @@ const createWebpackUtils = (stage, program) => {
78
80
  return rule;
79
81
  };
80
82
 
83
+ const fileLoaderCommonOptions = {
84
+ name: `${assetRelativeRoot}[name]-[hash].[ext]`
85
+ };
86
+
87
+ if (stage === `build-html` || stage === `develop-html`) {
88
+ // build-html and develop-html outputs to `.cache/page-ssr/routes/` (ROUTES_DIRECTORY)
89
+ // so this config is setting it to output assets to `public` (outputPath)
90
+ // while preserving "url" (publicPath)
91
+ fileLoaderCommonOptions.outputPath = path.relative(_constants.ROUTES_DIRECTORY, `public`);
92
+ fileLoaderCommonOptions.publicPath = `/`;
93
+ }
94
+
81
95
  const loaders = {
82
96
  json: (options = {}) => {
83
97
  return {
@@ -209,8 +223,7 @@ const createWebpackUtils = (stage, program) => {
209
223
  file: (options = {}) => {
210
224
  return {
211
225
  loader: require.resolve(`file-loader`),
212
- options: {
213
- name: `${assetRelativeRoot}[name]-[hash].[ext]`,
226
+ options: { ...fileLoaderCommonOptions,
214
227
  ...options
215
228
  }
216
229
  };
@@ -220,7 +233,7 @@ const createWebpackUtils = (stage, program) => {
220
233
  loader: require.resolve(`url-loader`),
221
234
  options: {
222
235
  limit: 10000,
223
- name: `${assetRelativeRoot}[name]-[hash].[ext]`,
236
+ ...fileLoaderCommonOptions,
224
237
  fallback: require.resolve(`file-loader`),
225
238
  ...options
226
239
  }
@@ -1 +1 @@
1
- {"version":3,"file":"webpack-utils.js","names":["vendorRegex","createWebpackUtils","stage","program","assetRelativeRoot","supportedBrowsers","getBrowsersList","directory","PRODUCTION","includes","isSSR","config","store","getState","assetPrefix","pathPrefix","publicPath","getPublicPath","makeExternalOnly","original","options","rule","include","makeInternalOnly","exclude","loaders","json","loader","require","resolve","yaml","null","raw","style","miniCssExtract","moduleOptions","undefined","modules","restOptions","namedExport","MiniCssExtractPlugin","css","modulesOptions","auto","localIdentName","exportLocalsConvention","exportOnlyLocals","url","startsWith","sourceMap","postcss","plugins","overrideBrowserslist","postcssOpts","execute","postcssOptions","loaderContext","postCSSPlugins","autoprefixerPlugin","autoprefixer","flexbox","find","plugin","postcssPlugin","unshift","flexbugs","file","name","limit","fallback","js","reactRuntime","jsxRuntime","reactImportSource","jsxImportSource","cacheDirectory","path","join","rootDir","dependencies","rules","modulesThatUseGatsby","test","modulePath","some","module","type","use","resourceQuery","issuer","configFile","compact","isPageTemplate","jsOptions","babelrc","presets","sourceMaps","cacheIdentifier","JSON","stringify","browsersList","gatsbyPreset","version","VENDORS_TO_NOT_POLYFILL","doNotPolyfillRegex","RegExp","fonts","images","media","miscAssets","browsers","importLoaders","filter","Boolean","internal","external","cssModules","builtinPlugins","minifyJs","terserOptions","TerserPlugin","ie8","mangle","safari10","parse","ecma","compress","output","parallel","Math","max","cpuCoreCount","minifyCss","minimizerOptions","preset","svgo","full","CssMinimizerPlugin","fastRefresh","regExpToHack","ReactRefreshWebpackPlugin","overlay","sockIntegration","__dirname","extractText","moment","ignore","resourceRegExp","contextRegExp","extractStats","GatsbyWebpackStatsExtractor","eslintGraphqlSchemaReload","virtualModules","GatsbyWebpackVirtualModules","eslint","extensions","VIRTUAL_MODULES_BASE_PATH","eslintConfig","ESLintPlugin","eslintRequired","eslintRequiredConfig"],"sources":["../../src/utils/webpack-utils.ts"],"sourcesContent":["import * as path from \"path\"\nimport { RuleSetRule, WebpackPluginInstance } from \"webpack\"\nimport { GraphQLSchema } from \"graphql\"\nimport { Plugin as PostCSSPlugin } from \"postcss\"\nimport autoprefixer from \"autoprefixer\"\nimport flexbugs from \"postcss-flexbugs-fixes\"\nimport TerserPlugin from \"terser-webpack-plugin\"\nimport type { MinifyOptions as TerserOptions } from \"terser\"\nimport MiniCssExtractPlugin from \"mini-css-extract-plugin\"\nimport CssMinimizerPlugin from \"css-minimizer-webpack-plugin\"\nimport ReactRefreshWebpackPlugin from \"@pmmmwh/react-refresh-webpack-plugin\"\nimport { getBrowsersList } from \"./browserslist\"\nimport ESLintPlugin from \"eslint-webpack-plugin\"\nimport { cpuCoreCount } from \"gatsby-core-utils\"\nimport { GatsbyWebpackStatsExtractor } from \"./gatsby-webpack-stats-extractor\"\nimport { getPublicPath } from \"./get-public-path\"\nimport {\n GatsbyWebpackVirtualModules,\n VIRTUAL_MODULES_BASE_PATH,\n} from \"./gatsby-webpack-virtual-modules\"\n\nimport { builtinPlugins } from \"./webpack-plugins\"\nimport { IProgram, Stage } from \"../commands/types\"\nimport { eslintConfig, eslintRequiredConfig } from \"./eslint-config\"\nimport { store } from \"../redux\"\nimport type { RuleSetUseItem } from \"webpack\"\n\ntype Loader = string | { loader: string; options?: { [name: string]: any } }\ntype LoaderResolver<T = Record<string, unknown>> = (options?: T) => Loader\n\ntype LoaderOptions = Record<string, any>\ntype RuleFactory<T = Record<string, unknown>> = (\n options?: T & LoaderOptions\n) => RuleSetRule\n\ntype ContextualRuleFactory<T = Record<string, unknown>> = RuleFactory<T> & {\n internal?: RuleFactory<T>\n external?: RuleFactory<T>\n}\n\ntype PluginFactory = (...args: any) => WebpackPluginInstance | null\n\ntype BuiltinPlugins = typeof builtinPlugins\n\ntype CSSModulesOptions =\n | boolean\n | string\n | {\n mode?:\n | \"local\"\n | \"global\"\n | \"pure\"\n | ((resourcePath: string) => \"local\" | \"global\" | \"pure\")\n auto?: boolean\n exportGlobals?: boolean\n localIdentName?: string\n localIdentContext?: string\n localIdentHashPrefix?: string\n namedExport?: boolean\n exportLocalsConvention?:\n | \"asIs\"\n | \"camelCaseOnly\"\n | \"camelCase\"\n | \"dashes\"\n | \"dashesOnly\"\n exportOnlyLocals?: boolean\n }\n\ntype MiniCSSExtractLoaderModuleOptions =\n | undefined\n | boolean\n | {\n namedExport?: boolean\n }\n/**\n * Utils that produce webpack `loader` objects\n */\ninterface ILoaderUtils {\n yaml: LoaderResolver\n style: LoaderResolver\n css: LoaderResolver<{\n url?: boolean | ((url: string, resourcePath: string) => boolean)\n import?:\n | boolean\n | ((url: string, media: string, resourcePath: string) => boolean)\n modules?: CSSModulesOptions\n sourceMap?: boolean\n importLoaders?: number\n esModule?: boolean\n }>\n postcss: LoaderResolver<{\n browsers?: Array<string>\n overrideBrowserslist?: Array<string>\n plugins?: Array<PostCSSPlugin> | ((loader: Loader) => Array<PostCSSPlugin>)\n }>\n\n file: LoaderResolver\n url: LoaderResolver\n js: LoaderResolver\n json: LoaderResolver\n null: LoaderResolver\n raw: LoaderResolver\n dependencies: LoaderResolver\n\n miniCssExtract: LoaderResolver\n imports?: LoaderResolver\n exports?: LoaderResolver\n}\n\ninterface IModuleThatUseGatsby {\n name: string\n path: string\n}\n\ntype CssLoaderModuleOption = boolean | Record<string, any> | string\n\n/**\n * Utils that produce webpack rule objects\n */\ninterface IRuleUtils {\n /**\n * Handles JavaScript compilation via babel\n */\n js: RuleFactory<{ modulesThatUseGatsby?: Array<IModuleThatUseGatsby> }>\n dependencies: RuleFactory<{\n modulesThatUseGatsby?: Array<IModuleThatUseGatsby>\n }>\n yaml: RuleFactory\n fonts: RuleFactory\n images: RuleFactory\n miscAssets: RuleFactory\n media: RuleFactory\n\n css: ContextualRuleFactory<{\n browsers?: Array<string>\n modules?: CssLoaderModuleOption\n }>\n cssModules: RuleFactory\n postcss: ContextualRuleFactory<{ overrideBrowserOptions: Array<string> }>\n\n eslint: (schema: GraphQLSchema) => RuleSetRule\n eslintRequired: () => RuleSetRule\n}\n\ntype PluginUtils = BuiltinPlugins & {\n extractText: PluginFactory\n uglify: PluginFactory\n moment: PluginFactory\n extractStats: PluginFactory\n minifyJs: PluginFactory\n minifyCss: PluginFactory\n fastRefresh: PluginFactory\n eslintGraphqlSchemaReload: PluginFactory\n virtualModules: PluginFactory\n eslint: PluginFactory\n eslintRequired: PluginFactory\n}\n\n/**\n * webpack atoms namespace\n */\ninterface IWebpackUtils {\n loaders: ILoaderUtils\n\n rules: IRuleUtils\n\n plugins: PluginUtils\n}\n\nconst vendorRegex = /(node_modules|bower_components)/\n\n/**\n * A factory method that produces an atoms namespace\n */\nexport const createWebpackUtils = (\n stage: Stage,\n program: IProgram\n): IWebpackUtils => {\n const assetRelativeRoot = `static/`\n const supportedBrowsers = getBrowsersList(program.directory)\n\n const PRODUCTION = !stage.includes(`develop`)\n\n const isSSR = stage.includes(`html`)\n const { config } = store.getState()\n const { assetPrefix, pathPrefix } = config\n\n const publicPath = getPublicPath({ assetPrefix, pathPrefix, ...program })\n\n const makeExternalOnly =\n (original: RuleFactory) =>\n (options = {}): RuleSetRule => {\n const rule = original(options)\n rule.include = vendorRegex\n return rule\n }\n\n const makeInternalOnly =\n (original: RuleFactory) =>\n (options = {}): RuleSetRule => {\n const rule = original(options)\n rule.exclude = vendorRegex\n return rule\n }\n\n const loaders: ILoaderUtils = {\n json: (options = {}) => {\n return {\n options,\n loader: require.resolve(`json-loader`),\n }\n },\n yaml: (options = {}) => {\n return {\n options,\n loader: require.resolve(`yaml-loader`),\n }\n },\n\n null: (options = {}) => {\n return {\n options,\n loader: require.resolve(`null-loader`),\n }\n },\n\n raw: (options = {}) => {\n return {\n options,\n loader: require.resolve(`raw-loader`),\n }\n },\n\n style: (options = {}) => {\n return {\n options,\n loader: require.resolve(`style-loader`),\n }\n },\n\n // TODO(v5): Re-Apply https://github.com/gatsbyjs/gatsby/pull/33979 with breaking change in inline loader syntax\n miniCssExtract: (\n options: {\n modules?: MiniCSSExtractLoaderModuleOptions\n } = {}\n ) => {\n let moduleOptions: MiniCSSExtractLoaderModuleOptions = undefined\n\n const { modules, ...restOptions } = options\n\n if (typeof modules === `boolean` && options.modules) {\n moduleOptions = {\n namedExport: true,\n }\n } else {\n moduleOptions = modules\n }\n\n return {\n loader: MiniCssExtractPlugin.loader,\n options: {\n modules: moduleOptions,\n ...restOptions,\n },\n }\n },\n\n css: (options = {}) => {\n let modulesOptions: CSSModulesOptions = false\n if (options.modules) {\n modulesOptions = {\n auto: undefined,\n namedExport: true,\n localIdentName: `[name]--[local]--[hash:hex:5]`,\n exportLocalsConvention: `dashesOnly`,\n exportOnlyLocals: isSSR,\n }\n\n if (typeof options.modules === `object`) {\n modulesOptions = {\n ...modulesOptions,\n ...options.modules,\n }\n }\n }\n\n return {\n loader: require.resolve(`css-loader`),\n options: {\n // Absolute urls (https or //) are not send to this function. Only resolvable paths absolute or relative ones.\n url: function (url: string): boolean {\n // When an url starts with /\n if (url.startsWith(`/`)) {\n return false\n }\n\n return true\n },\n sourceMap: !PRODUCTION,\n modules: modulesOptions,\n },\n }\n },\n\n postcss: (options = {}) => {\n const {\n plugins,\n overrideBrowserslist = supportedBrowsers,\n ...postcssOpts\n } = options\n\n return {\n loader: require.resolve(`postcss-loader`),\n options: {\n execute: false,\n sourceMap: !PRODUCTION,\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type\n postcssOptions: (loaderContext: any) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let postCSSPlugins: Array<PostCSSPlugin> = []\n if (plugins) {\n postCSSPlugins =\n typeof plugins === `function` ? plugins(loaderContext) : plugins\n }\n\n const autoprefixerPlugin = autoprefixer({\n overrideBrowserslist,\n flexbox: `no-2009`,\n ...((\n postCSSPlugins.find(\n plugin => plugin.postcssPlugin === `autoprefixer`\n ) as unknown as autoprefixer.ExportedAPI\n )?.options ?? {}),\n })\n\n postCSSPlugins.unshift(autoprefixerPlugin)\n postCSSPlugins.unshift(flexbugs)\n\n return {\n plugins: postCSSPlugins,\n ...postcssOpts,\n }\n },\n },\n }\n },\n\n file: (options = {}) => {\n return {\n loader: require.resolve(`file-loader`),\n options: {\n name: `${assetRelativeRoot}[name]-[hash].[ext]`,\n ...options,\n },\n }\n },\n\n url: (options = {}) => {\n return {\n loader: require.resolve(`url-loader`),\n options: {\n limit: 10000,\n name: `${assetRelativeRoot}[name]-[hash].[ext]`,\n fallback: require.resolve(`file-loader`),\n ...options,\n },\n }\n },\n\n js: options => {\n return {\n options: {\n stage,\n reactRuntime: config.jsxRuntime,\n reactImportSource: config.jsxImportSource,\n cacheDirectory: path.join(\n program.directory,\n `.cache`,\n `webpack`,\n `babel`\n ),\n ...options,\n rootDir: program.directory,\n },\n loader: require.resolve(`./babel-loader`),\n }\n },\n\n dependencies: options => {\n return {\n options: {\n cacheDirectory: path.join(\n program.directory,\n `.cache`,\n `webpack`,\n `babel`\n ),\n ...options,\n },\n loader: require.resolve(`babel-loader`),\n }\n },\n }\n\n /**\n * Rules\n */\n const rules = {} as IRuleUtils\n\n /**\n * JavaScript loader via babel, includes userland code\n * and packages that depend on `gatsby`\n */\n {\n const js = ({\n modulesThatUseGatsby = [],\n ...options\n }: {\n modulesThatUseGatsby?: Array<IModuleThatUseGatsby>\n } = {}): RuleSetRule => {\n return {\n test: /\\.(js|mjs|jsx|ts|tsx)$/,\n include: (modulePath: string): boolean => {\n // when it's not coming from node_modules we treat it as a source file.\n if (!vendorRegex.test(modulePath)) {\n return true\n }\n\n // If the module uses Gatsby as a dependency\n // we want to treat it as src so we can extract queries\n return modulesThatUseGatsby.some(module =>\n modulePath.includes(module.path)\n )\n },\n type: `javascript/auto`,\n use: ({ resourceQuery, issuer }): Array<RuleSetUseItem> => [\n // If a JS import comes from async-requires, assume it is for a page component.\n // Using `issuer` allows us to avoid mutating async-requires for this case.\n //\n // If other imports are added to async-requires in the future, another option is to\n // append a query param to page components in the store and check against `resourceQuery` here.\n //\n // This would require we adjust `doesModuleMatchResourcePath` in `static-query-mapper`\n // to check against the module's `resourceResolveData.path` instead of resource to avoid\n // mismatches because of the added query param. Other adjustments may also be needed.\n loaders.js({\n ...options,\n configFile: true,\n compact: PRODUCTION,\n isPageTemplate: /async-requires/.test(issuer),\n resourceQuery,\n }),\n ],\n }\n }\n rules.js = js\n }\n\n /**\n * Node_modules JavaScript loader via babel\n * Excludes core-js & babel-runtime to speedup babel transpilation\n * Excludes modules that use Gatsby since the `rules.js` already transpiles those\n */\n {\n const dependencies = ({\n modulesThatUseGatsby = [],\n }: {\n modulesThatUseGatsby?: Array<IModuleThatUseGatsby>\n } = {}): RuleSetRule => {\n const jsOptions = {\n babelrc: false,\n configFile: false,\n compact: false,\n presets: [\n [\n require.resolve(`babel-preset-gatsby/dependencies`),\n {\n stage,\n },\n ],\n ],\n // If an error happens in a package, it's possible to be\n // because it was compiled. Thus, we don't want the browser\n // debugger to show the original code. Instead, the code\n // being evaluated would be much more helpful.\n sourceMaps: false,\n\n cacheIdentifier: JSON.stringify({\n browsersList: supportedBrowsers,\n gatsbyPreset: require(`babel-preset-gatsby/package.json`).version,\n }),\n }\n\n // TODO REMOVE IN V3\n // a list of vendors we know we shouldn't polyfill (we should have set core-js to entry but we didn't so we have to do this)\n const VENDORS_TO_NOT_POLYFILL = [\n `@babel[\\\\\\\\/]runtime`,\n `@mikaelkristiansson[\\\\\\\\/]domready`,\n `@reach[\\\\\\\\/]router`,\n `babel-preset-gatsby`,\n `core-js`,\n `dom-helpers`,\n `gatsby-legacy-polyfills`,\n `gatsby-link`,\n `gatsby-script`,\n `gatsby-react-router-scroll`,\n `invariant`,\n `lodash`,\n `mitt`,\n `prop-types`,\n `react-dom`,\n `react`,\n `regenerator-runtime`,\n `scheduler`,\n `scroll-behavior`,\n `shallow-compare`,\n `warning`,\n `webpack`,\n ]\n const doNotPolyfillRegex = new RegExp(\n `[\\\\\\\\/]node_modules[\\\\\\\\/](${VENDORS_TO_NOT_POLYFILL.join(\n `|`\n )})[\\\\\\\\/]`\n )\n\n return {\n test: /\\.(js|mjs)$/,\n exclude: (modulePath: string): boolean => {\n // If dep is user land code, exclude\n if (!vendorRegex.test(modulePath)) {\n return true\n }\n\n // If dep uses Gatsby, exclude\n if (\n modulesThatUseGatsby.some(module =>\n modulePath.includes(module.path)\n )\n ) {\n return true\n }\n\n return doNotPolyfillRegex.test(modulePath)\n },\n type: `javascript/auto`,\n use: [loaders.dependencies(jsOptions)],\n }\n }\n rules.dependencies = dependencies\n }\n\n rules.yaml = (): RuleSetRule => {\n return {\n test: /\\.ya?ml$/,\n type: `json`,\n use: [loaders.yaml()],\n }\n }\n\n /**\n * Font loader\n */\n rules.fonts = (): RuleSetRule => {\n return {\n use: [loaders.url()],\n test: /\\.(eot|otf|ttf|woff(2)?)(\\?.*)?$/,\n }\n }\n\n /**\n * Loads image assets, inlines images via a data URI if they are below\n * the size threshold\n */\n rules.images = (): RuleSetRule => {\n return {\n use: [loaders.url()],\n test: /\\.(ico|svg|jpg|jpeg|png|gif|webp|avif)(\\?.*)?$/,\n }\n }\n\n /**\n * Loads audio and video and inlines them via a data URI if they are below\n * the size threshold\n */\n rules.media = (): RuleSetRule => {\n return {\n use: [loaders.url()],\n test: /\\.(mp4|webm|ogv|wav|mp3|m4a|aac|oga|flac)$/,\n }\n }\n\n /**\n * Loads assets without inlining\n */\n rules.miscAssets = (): RuleSetRule => {\n return {\n use: [loaders.file()],\n test: /\\.pdf$/,\n }\n }\n\n /**\n * CSS style loader.\n */\n {\n const css: IRuleUtils[\"css\"] = (options = {}): RuleSetRule => {\n const { browsers, ...restOptions } = options\n const use = [\n !isSSR && loaders.miniCssExtract(restOptions),\n loaders.css({ ...restOptions, importLoaders: 1 }),\n loaders.postcss({ browsers }),\n ].filter(Boolean) as RuleSetRule[\"use\"]\n\n return {\n use,\n test: /\\.css$/,\n }\n }\n\n /**\n * CSS style loader, _excludes_ node_modules.\n */\n css.internal = makeInternalOnly(css)\n css.external = makeExternalOnly(css)\n\n const cssModules: IRuleUtils[\"cssModules\"] = (options): RuleSetRule => {\n const rule = css({ ...options, modules: true })\n delete rule.exclude\n rule.test = /\\.module\\.css$/\n return rule\n }\n\n rules.css = css\n rules.cssModules = cssModules\n }\n\n /**\n * PostCSS loader.\n */\n {\n const postcss: ContextualRuleFactory = (options): RuleSetRule => {\n return {\n test: /\\.css$/,\n use: [loaders.css({ importLoaders: 1 }), loaders.postcss(options)],\n }\n }\n\n /**\n * PostCSS loader, _excludes_ node_modules.\n */\n postcss.internal = makeInternalOnly(postcss)\n postcss.external = makeExternalOnly(postcss)\n rules.postcss = postcss\n }\n /**\n * cast rules to IRuleUtils\n */\n /**\n * Plugins\n */\n const plugins = { ...builtinPlugins } as PluginUtils\n\n plugins.minifyJs = ({\n terserOptions,\n ...options\n }: {\n terserOptions?: TerserOptions\n } = {}): WebpackPluginInstance =>\n new TerserPlugin({\n exclude: /\\.min\\.js/,\n terserOptions: {\n ie8: false,\n mangle: {\n safari10: true,\n },\n parse: {\n ecma: 5,\n },\n compress: {\n ecma: 5,\n },\n output: {\n ecma: 5,\n },\n ...terserOptions,\n },\n parallel: Math.max(1, cpuCoreCount() - 1),\n ...options,\n })\n\n plugins.minifyCss = (\n options = {\n minimizerOptions: {\n preset: [\n `default`,\n {\n svgo: {\n full: true,\n plugins: [\n // potentially destructive plugins removed - see https://github.com/gatsbyjs/gatsby/issues/15629\n // use correct config format and remove plugins requiring specific params - see https://github.com/gatsbyjs/gatsby/issues/31619\n // List of default plugins and their defaults: https://github.com/svg/svgo#built-in-plugins\n // Last update 2021-08-17\n `cleanupAttrs`,\n `cleanupEnableBackground`,\n `cleanupIDs`,\n `cleanupListOfValues`, // Default: disabled\n `cleanupNumericValues`,\n `collapseGroups`,\n `convertColors`,\n `convertPathData`,\n `convertStyleToAttrs`, // Default: disabled\n `convertTransform`,\n `inlineStyles`,\n `mergePaths`,\n `minifyStyles`,\n `moveElemsAttrsToGroup`,\n `moveGroupAttrsToElems`,\n `prefixIds`, // Default: disabled\n `removeComments`,\n `removeDesc`,\n `removeDoctype`,\n `removeEditorsNSData`,\n `removeEmptyAttrs`,\n `removeEmptyContainers`,\n `removeEmptyText`,\n `removeHiddenElems`,\n `removeMetadata`,\n `removeNonInheritableGroupAttrs`,\n `removeRasterImages`, // Default: disabled\n `removeScriptElement`, // Default: disabled\n `removeStyleElement`, // Default: disabled\n `removeTitle`,\n `removeUnknownsAndDefaults`,\n `removeUnusedNS`,\n `removeUselessDefs`,\n `removeUselessStrokeAndFill`,\n `removeXMLProcInst`,\n `reusePaths`, // Default: disabled\n `sortAttrs`, // Default: disabled\n ],\n },\n },\n ],\n },\n }\n ): CssMinimizerPlugin =>\n new CssMinimizerPlugin({\n parallel: Math.max(1, cpuCoreCount() - 1),\n ...options,\n })\n\n plugins.fastRefresh = ({ modulesThatUseGatsby }): WebpackPluginInstance => {\n const regExpToHack = /node_modules/\n regExpToHack.test = (modulePath: string): boolean => {\n // when it's not coming from node_modules we treat it as a source file.\n if (!vendorRegex.test(modulePath)) {\n return false\n }\n\n // If the module uses Gatsby as a dependency\n // we want to treat it as src because of shadowing\n return !modulesThatUseGatsby.some(module =>\n modulePath.includes(module.path)\n )\n }\n\n return new ReactRefreshWebpackPlugin({\n overlay: {\n sockIntegration: `whm`,\n module: path.join(__dirname, `fast-refresh-module`),\n },\n // this is a bit hacky - exclude expect string or regexp or array of those\n // so this is tricking ReactRefreshWebpackPlugin with providing regexp with\n // overwritten .test method\n exclude: regExpToHack,\n })\n }\n\n plugins.extractText = (options: any): WebpackPluginInstance =>\n new MiniCssExtractPlugin({\n ...options,\n })\n\n plugins.moment = (): WebpackPluginInstance =>\n plugins.ignore({ resourceRegExp: /^\\.\\/locale$/, contextRegExp: /moment$/ })\n\n plugins.extractStats = (): GatsbyWebpackStatsExtractor =>\n new GatsbyWebpackStatsExtractor(publicPath)\n\n // TODO: remove this in v5\n plugins.eslintGraphqlSchemaReload = (): null => null\n\n plugins.virtualModules = (): GatsbyWebpackVirtualModules =>\n new GatsbyWebpackVirtualModules()\n\n plugins.eslint = (): WebpackPluginInstance => {\n const options = {\n extensions: [`js`, `jsx`],\n exclude: [\n `/node_modules/`,\n `/bower_components/`,\n VIRTUAL_MODULES_BASE_PATH,\n ],\n ...eslintConfig(config.jsxRuntime === `automatic`),\n }\n // @ts-ignore\n return new ESLintPlugin(options)\n }\n\n plugins.eslintRequired = (): WebpackPluginInstance => {\n const options = {\n extensions: [`js`, `jsx`],\n exclude: [\n `/node_modules/`,\n `/bower_components/`,\n VIRTUAL_MODULES_BASE_PATH,\n ],\n ...eslintRequiredConfig,\n }\n // @ts-ignore\n return new ESLintPlugin(options)\n }\n\n return {\n loaders,\n rules,\n plugins,\n }\n}\n"],"mappings":";;;;;;;AAAA;;AAIA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAKA;;AAEA;;AACA;;;;;;AAiJA,MAAMA,WAAW,GAAG,iCAApB;AAEA;AACA;AACA;;AACO,MAAMC,kBAAkB,GAAG,CAChCC,KADgC,EAEhCC,OAFgC,KAGd;EAClB,MAAMC,iBAAiB,GAAI,SAA3B;EACA,MAAMC,iBAAiB,GA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ACrB,IAAIC,wDAAJ,CAAgCtI,UAAhC,CADF,CAlmBkB,CAqmBlB;;;EACAmC,OAAO,CAACoG,yBAAR,GAAoC,MAAY,IAAhD;;EAEApG,OAAO,CAACqG,cAAR,GAAyB,MACvB,IAAIC,wDAAJ,EADF;;EAGAtG,OAAO,CAACuG,MAAR,GAAiB,MAA6B;IAC5C,MAAMtI,OAAO,GAAG;MACduI,UAAU,EAAE,CAAE,IAAF,EAAQ,KAAR,CADE;MAEdnI,OAAO,EAAE,CACN,gBADM,EAEN,oBAFM,EAGPoI,sDAHO,CAFK;MAOd,GAAG,IAAAC,0BAAA,EAAalJ,MAAM,CAAC6D,UAAP,KAAuB,WAApC;IAPW,CAAhB,CAD4C,CAU5C;;IACA,OAAO,IAAIsF,4BAAJ,CAAiB1I,OAAjB,CAAP;EACD,CAZD;;EAcA+B,OAAO,CAAC4G,cAAR,GAAyB,MAA6B;IACpD,MAAM3I,OAAO,GAAG;MACduI,UAAU,EAAE,CAAE,IAAF,EAAQ,KAAR,CADE;MAEdnI,OAAO,EAAE,CACN,gBADM,EAEN,oBAFM,EAGPoI,sDAHO,CAFK;MAOd,GAAGI;IAPW,CAAhB,CADoD,CAUpD;;IACA,OAAO,IAAIF,4BAAJ,CAAiB1I,OAAjB,CAAP;EACD,CAZD;;EAcA,OAAO;IACLK,OADK;IAELuD,KAFK;IAGL7B;EAHK,CAAP;AAKD,CA/oBM"}
1
+ {"version":3,"file":"webpack-utils.js","names":["vendorRegex","createWebpackUtils","stage","program","assetRelativeRoot","supportedBrowsers","getBrowsersList","directory","PRODUCTION","includes","isSSR","config","store","getState","assetPrefix","pathPrefix","publicPath","getPublicPath","makeExternalOnly","original","options","rule","include","makeInternalOnly","exclude","fileLoaderCommonOptions","name","outputPath","path","relative","ROUTES_DIRECTORY","loaders","json","loader","require","resolve","yaml","null","raw","style","miniCssExtract","moduleOptions","undefined","modules","restOptions","namedExport","MiniCssExtractPlugin","css","modulesOptions","auto","localIdentName","exportLocalsConvention","exportOnlyLocals","url","startsWith","sourceMap","postcss","plugins","overrideBrowserslist","postcssOpts","execute","postcssOptions","loaderContext","postCSSPlugins","autoprefixerPlugin","autoprefixer","flexbox","find","plugin","postcssPlugin","unshift","flexbugs","file","limit","fallback","js","reactRuntime","jsxRuntime","reactImportSource","jsxImportSource","cacheDirectory","join","rootDir","dependencies","rules","modulesThatUseGatsby","test","modulePath","some","module","type","use","resourceQuery","issuer","configFile","compact","isPageTemplate","jsOptions","babelrc","presets","sourceMaps","cacheIdentifier","JSON","stringify","browsersList","gatsbyPreset","version","VENDORS_TO_NOT_POLYFILL","doNotPolyfillRegex","RegExp","fonts","images","media","miscAssets","browsers","importLoaders","filter","Boolean","internal","external","cssModules","builtinPlugins","minifyJs","terserOptions","TerserPlugin","ie8","mangle","safari10","parse","ecma","compress","output","parallel","Math","max","cpuCoreCount","minifyCss","minimizerOptions","preset","svgo","full","CssMinimizerPlugin","fastRefresh","regExpToHack","ReactRefreshWebpackPlugin","overlay","sockIntegration","__dirname","extractText","moment","ignore","resourceRegExp","contextRegExp","extractStats","GatsbyWebpackStatsExtractor","eslintGraphqlSchemaReload","virtualModules","GatsbyWebpackVirtualModules","eslint","extensions","VIRTUAL_MODULES_BASE_PATH","eslintConfig","ESLintPlugin","eslintRequired","eslintRequiredConfig"],"sources":["../../src/utils/webpack-utils.ts"],"sourcesContent":["import * as path from \"path\"\nimport { RuleSetRule, WebpackPluginInstance } from \"webpack\"\nimport { GraphQLSchema } from \"graphql\"\nimport { Plugin as PostCSSPlugin } from \"postcss\"\nimport autoprefixer from \"autoprefixer\"\nimport flexbugs from \"postcss-flexbugs-fixes\"\nimport TerserPlugin from \"terser-webpack-plugin\"\nimport type { MinifyOptions as TerserOptions } from \"terser\"\nimport MiniCssExtractPlugin from \"mini-css-extract-plugin\"\nimport CssMinimizerPlugin from \"css-minimizer-webpack-plugin\"\nimport ReactRefreshWebpackPlugin from \"@pmmmwh/react-refresh-webpack-plugin\"\nimport { getBrowsersList } from \"./browserslist\"\nimport ESLintPlugin from \"eslint-webpack-plugin\"\nimport { cpuCoreCount } from \"gatsby-core-utils\"\nimport { GatsbyWebpackStatsExtractor } from \"./gatsby-webpack-stats-extractor\"\nimport { getPublicPath } from \"./get-public-path\"\nimport {\n GatsbyWebpackVirtualModules,\n VIRTUAL_MODULES_BASE_PATH,\n} from \"./gatsby-webpack-virtual-modules\"\n\nimport { builtinPlugins } from \"./webpack-plugins\"\nimport { IProgram, Stage } from \"../commands/types\"\nimport { eslintConfig, eslintRequiredConfig } from \"./eslint-config\"\nimport { store } from \"../redux\"\nimport type { RuleSetUseItem } from \"webpack\"\nimport { ROUTES_DIRECTORY } from \"../constants\"\n\ntype Loader = string | { loader: string; options?: { [name: string]: any } }\ntype LoaderResolver<T = Record<string, unknown>> = (options?: T) => Loader\n\ntype LoaderOptions = Record<string, any>\ntype RuleFactory<T = Record<string, unknown>> = (\n options?: T & LoaderOptions\n) => RuleSetRule\n\ntype ContextualRuleFactory<T = Record<string, unknown>> = RuleFactory<T> & {\n internal?: RuleFactory<T>\n external?: RuleFactory<T>\n}\n\ntype PluginFactory = (...args: any) => WebpackPluginInstance | null\n\ntype BuiltinPlugins = typeof builtinPlugins\n\ntype CSSModulesOptions =\n | boolean\n | string\n | {\n mode?:\n | \"local\"\n | \"global\"\n | \"pure\"\n | ((resourcePath: string) => \"local\" | \"global\" | \"pure\")\n auto?: boolean\n exportGlobals?: boolean\n localIdentName?: string\n localIdentContext?: string\n localIdentHashPrefix?: string\n namedExport?: boolean\n exportLocalsConvention?:\n | \"asIs\"\n | \"camelCaseOnly\"\n | \"camelCase\"\n | \"dashes\"\n | \"dashesOnly\"\n exportOnlyLocals?: boolean\n }\n\ntype MiniCSSExtractLoaderModuleOptions =\n | undefined\n | boolean\n | {\n namedExport?: boolean\n }\n/**\n * Utils that produce webpack `loader` objects\n */\ninterface ILoaderUtils {\n yaml: LoaderResolver\n style: LoaderResolver\n css: LoaderResolver<{\n url?: boolean | ((url: string, resourcePath: string) => boolean)\n import?:\n | boolean\n | ((url: string, media: string, resourcePath: string) => boolean)\n modules?: CSSModulesOptions\n sourceMap?: boolean\n importLoaders?: number\n esModule?: boolean\n }>\n postcss: LoaderResolver<{\n browsers?: Array<string>\n overrideBrowserslist?: Array<string>\n plugins?: Array<PostCSSPlugin> | ((loader: Loader) => Array<PostCSSPlugin>)\n }>\n\n file: LoaderResolver\n url: LoaderResolver\n js: LoaderResolver\n json: LoaderResolver\n null: LoaderResolver\n raw: LoaderResolver\n dependencies: LoaderResolver\n\n miniCssExtract: LoaderResolver\n imports?: LoaderResolver\n exports?: LoaderResolver\n}\n\ninterface IModuleThatUseGatsby {\n name: string\n path: string\n}\n\ntype CssLoaderModuleOption = boolean | Record<string, any> | string\n\n/**\n * Utils that produce webpack rule objects\n */\ninterface IRuleUtils {\n /**\n * Handles JavaScript compilation via babel\n */\n js: RuleFactory<{ modulesThatUseGatsby?: Array<IModuleThatUseGatsby> }>\n dependencies: RuleFactory<{\n modulesThatUseGatsby?: Array<IModuleThatUseGatsby>\n }>\n yaml: RuleFactory\n fonts: RuleFactory\n images: RuleFactory\n miscAssets: RuleFactory\n media: RuleFactory\n\n css: ContextualRuleFactory<{\n browsers?: Array<string>\n modules?: CssLoaderModuleOption\n }>\n cssModules: RuleFactory\n postcss: ContextualRuleFactory<{ overrideBrowserOptions: Array<string> }>\n\n eslint: (schema: GraphQLSchema) => RuleSetRule\n eslintRequired: () => RuleSetRule\n}\n\ntype PluginUtils = BuiltinPlugins & {\n extractText: PluginFactory\n uglify: PluginFactory\n moment: PluginFactory\n extractStats: PluginFactory\n minifyJs: PluginFactory\n minifyCss: PluginFactory\n fastRefresh: PluginFactory\n eslintGraphqlSchemaReload: PluginFactory\n virtualModules: PluginFactory\n eslint: PluginFactory\n eslintRequired: PluginFactory\n}\n\n/**\n * webpack atoms namespace\n */\ninterface IWebpackUtils {\n loaders: ILoaderUtils\n\n rules: IRuleUtils\n\n plugins: PluginUtils\n}\n\nconst vendorRegex = /(node_modules|bower_components)/\n\n/**\n * A factory method that produces an atoms namespace\n */\nexport const createWebpackUtils = (\n stage: Stage,\n program: IProgram\n): IWebpackUtils => {\n const assetRelativeRoot = `static/`\n const supportedBrowsers = getBrowsersList(program.directory)\n\n const PRODUCTION = !stage.includes(`develop`)\n\n const isSSR = stage.includes(`html`)\n const { config } = store.getState()\n const { assetPrefix, pathPrefix } = config\n\n const publicPath = getPublicPath({ assetPrefix, pathPrefix, ...program })\n\n const makeExternalOnly =\n (original: RuleFactory) =>\n (options = {}): RuleSetRule => {\n const rule = original(options)\n rule.include = vendorRegex\n return rule\n }\n\n const makeInternalOnly =\n (original: RuleFactory) =>\n (options = {}): RuleSetRule => {\n const rule = original(options)\n rule.exclude = vendorRegex\n return rule\n }\n\n const fileLoaderCommonOptions: {\n name: string\n publicPath?: string\n outputPath?: string\n } = {\n name: `${assetRelativeRoot}[name]-[hash].[ext]`,\n }\n\n if (stage === `build-html` || stage === `develop-html`) {\n // build-html and develop-html outputs to `.cache/page-ssr/routes/` (ROUTES_DIRECTORY)\n // so this config is setting it to output assets to `public` (outputPath)\n // while preserving \"url\" (publicPath)\n fileLoaderCommonOptions.outputPath = path.relative(\n ROUTES_DIRECTORY,\n `public`\n )\n fileLoaderCommonOptions.publicPath = `/`\n }\n\n const loaders: ILoaderUtils = {\n json: (options = {}) => {\n return {\n options,\n loader: require.resolve(`json-loader`),\n }\n },\n yaml: (options = {}) => {\n return {\n options,\n loader: require.resolve(`yaml-loader`),\n }\n },\n\n null: (options = {}) => {\n return {\n options,\n loader: require.resolve(`null-loader`),\n }\n },\n\n raw: (options = {}) => {\n return {\n options,\n loader: require.resolve(`raw-loader`),\n }\n },\n\n style: (options = {}) => {\n return {\n options,\n loader: require.resolve(`style-loader`),\n }\n },\n\n // TODO(v5): Re-Apply https://github.com/gatsbyjs/gatsby/pull/33979 with breaking change in inline loader syntax\n miniCssExtract: (\n options: {\n modules?: MiniCSSExtractLoaderModuleOptions\n } = {}\n ) => {\n let moduleOptions: MiniCSSExtractLoaderModuleOptions = undefined\n\n const { modules, ...restOptions } = options\n\n if (typeof modules === `boolean` && options.modules) {\n moduleOptions = {\n namedExport: true,\n }\n } else {\n moduleOptions = modules\n }\n\n return {\n loader: MiniCssExtractPlugin.loader,\n options: {\n modules: moduleOptions,\n ...restOptions,\n },\n }\n },\n\n css: (options = {}) => {\n let modulesOptions: CSSModulesOptions = false\n if (options.modules) {\n modulesOptions = {\n auto: undefined,\n namedExport: true,\n localIdentName: `[name]--[local]--[hash:hex:5]`,\n exportLocalsConvention: `dashesOnly`,\n exportOnlyLocals: isSSR,\n }\n\n if (typeof options.modules === `object`) {\n modulesOptions = {\n ...modulesOptions,\n ...options.modules,\n }\n }\n }\n\n return {\n loader: require.resolve(`css-loader`),\n options: {\n // Absolute urls (https or //) are not send to this function. Only resolvable paths absolute or relative ones.\n url: function (url: string): boolean {\n // When an url starts with /\n if (url.startsWith(`/`)) {\n return false\n }\n\n return true\n },\n sourceMap: !PRODUCTION,\n modules: modulesOptions,\n },\n }\n },\n\n postcss: (options = {}) => {\n const {\n plugins,\n overrideBrowserslist = supportedBrowsers,\n ...postcssOpts\n } = options\n\n return {\n loader: require.resolve(`postcss-loader`),\n options: {\n execute: false,\n sourceMap: !PRODUCTION,\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type\n postcssOptions: (loaderContext: any) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let postCSSPlugins: Array<PostCSSPlugin> = []\n if (plugins) {\n postCSSPlugins =\n typeof plugins === `function` ? plugins(loaderContext) : plugins\n }\n\n const autoprefixerPlugin = autoprefixer({\n overrideBrowserslist,\n flexbox: `no-2009`,\n ...((\n postCSSPlugins.find(\n plugin => plugin.postcssPlugin === `autoprefixer`\n ) as unknown as autoprefixer.ExportedAPI\n )?.options ?? {}),\n })\n\n postCSSPlugins.unshift(autoprefixerPlugin)\n postCSSPlugins.unshift(flexbugs)\n\n return {\n plugins: postCSSPlugins,\n ...postcssOpts,\n }\n },\n },\n }\n },\n\n file: (options = {}) => {\n return {\n loader: require.resolve(`file-loader`),\n options: {\n ...fileLoaderCommonOptions,\n ...options,\n },\n }\n },\n\n url: (options = {}) => {\n return {\n loader: require.resolve(`url-loader`),\n options: {\n limit: 10000,\n ...fileLoaderCommonOptions,\n fallback: require.resolve(`file-loader`),\n ...options,\n },\n }\n },\n\n js: options => {\n return {\n options: {\n stage,\n reactRuntime: config.jsxRuntime,\n reactImportSource: config.jsxImportSource,\n cacheDirectory: path.join(\n program.directory,\n `.cache`,\n `webpack`,\n `babel`\n ),\n ...options,\n rootDir: program.directory,\n },\n loader: require.resolve(`./babel-loader`),\n }\n },\n\n dependencies: options => {\n return {\n options: {\n cacheDirectory: path.join(\n program.directory,\n `.cache`,\n `webpack`,\n `babel`\n ),\n ...options,\n },\n loader: require.resolve(`babel-loader`),\n }\n },\n }\n\n /**\n * Rules\n */\n const rules = {} as IRuleUtils\n\n /**\n * JavaScript loader via babel, includes userland code\n * and packages that depend on `gatsby`\n */\n {\n const js = ({\n modulesThatUseGatsby = [],\n ...options\n }: {\n modulesThatUseGatsby?: Array<IModuleThatUseGatsby>\n } = {}): RuleSetRule => {\n return {\n test: /\\.(js|mjs|jsx|ts|tsx)$/,\n include: (modulePath: string): boolean => {\n // when it's not coming from node_modules we treat it as a source file.\n if (!vendorRegex.test(modulePath)) {\n return true\n }\n\n // If the module uses Gatsby as a dependency\n // we want to treat it as src so we can extract queries\n return modulesThatUseGatsby.some(module =>\n modulePath.includes(module.path)\n )\n },\n type: `javascript/auto`,\n use: ({ resourceQuery, issuer }): Array<RuleSetUseItem> => [\n // If a JS import comes from async-requires, assume it is for a page component.\n // Using `issuer` allows us to avoid mutating async-requires for this case.\n //\n // If other imports are added to async-requires in the future, another option is to\n // append a query param to page components in the store and check against `resourceQuery` here.\n //\n // This would require we adjust `doesModuleMatchResourcePath` in `static-query-mapper`\n // to check against the module's `resourceResolveData.path` instead of resource to avoid\n // mismatches because of the added query param. Other adjustments may also be needed.\n loaders.js({\n ...options,\n configFile: true,\n compact: PRODUCTION,\n isPageTemplate: /async-requires/.test(issuer),\n resourceQuery,\n }),\n ],\n }\n }\n rules.js = js\n }\n\n /**\n * Node_modules JavaScript loader via babel\n * Excludes core-js & babel-runtime to speedup babel transpilation\n * Excludes modules that use Gatsby since the `rules.js` already transpiles those\n */\n {\n const dependencies = ({\n modulesThatUseGatsby = [],\n }: {\n modulesThatUseGatsby?: Array<IModuleThatUseGatsby>\n } = {}): RuleSetRule => {\n const jsOptions = {\n babelrc: false,\n configFile: false,\n compact: false,\n presets: [\n [\n require.resolve(`babel-preset-gatsby/dependencies`),\n {\n stage,\n },\n ],\n ],\n // If an error happens in a package, it's possible to be\n // because it was compiled. Thus, we don't want the browser\n // debugger to show the original code. Instead, the code\n // being evaluated would be much more helpful.\n sourceMaps: false,\n\n cacheIdentifier: JSON.stringify({\n browsersList: supportedBrowsers,\n gatsbyPreset: require(`babel-preset-gatsby/package.json`).version,\n }),\n }\n\n // TODO REMOVE IN V3\n // a list of vendors we know we shouldn't polyfill (we should have set core-js to entry but we didn't so we have to do this)\n const VENDORS_TO_NOT_POLYFILL = [\n `@babel[\\\\\\\\/]runtime`,\n `@mikaelkristiansson[\\\\\\\\/]domready`,\n `@reach[\\\\\\\\/]router`,\n `babel-preset-gatsby`,\n `core-js`,\n `dom-helpers`,\n `gatsby-legacy-polyfills`,\n `gatsby-link`,\n `gatsby-script`,\n `gatsby-react-router-scroll`,\n `invariant`,\n `lodash`,\n `mitt`,\n `prop-types`,\n `react-dom`,\n `react`,\n `regenerator-runtime`,\n `scheduler`,\n `scroll-behavior`,\n `shallow-compare`,\n `warning`,\n `webpack`,\n ]\n const doNotPolyfillRegex = new RegExp(\n `[\\\\\\\\/]node_modules[\\\\\\\\/](${VENDORS_TO_NOT_POLYFILL.join(\n `|`\n )})[\\\\\\\\/]`\n )\n\n return {\n test: /\\.(js|mjs)$/,\n exclude: (modulePath: string): boolean => {\n // If dep is user land code, exclude\n if (!vendorRegex.test(modulePath)) {\n return true\n }\n\n // If dep uses Gatsby, exclude\n if (\n modulesThatUseGatsby.some(module =>\n modulePath.includes(module.path)\n )\n ) {\n return true\n }\n\n return doNotPolyfillRegex.test(modulePath)\n },\n type: `javascript/auto`,\n use: [loaders.dependencies(jsOptions)],\n }\n }\n rules.dependencies = dependencies\n }\n\n rules.yaml = (): RuleSetRule => {\n return {\n test: /\\.ya?ml$/,\n type: `json`,\n use: [loaders.yaml()],\n }\n }\n\n /**\n * Font loader\n */\n rules.fonts = (): RuleSetRule => {\n return {\n use: [loaders.url()],\n test: /\\.(eot|otf|ttf|woff(2)?)(\\?.*)?$/,\n }\n }\n\n /**\n * Loads image assets, inlines images via a data URI if they are below\n * the size threshold\n */\n rules.images = (): RuleSetRule => {\n return {\n use: [loaders.url()],\n test: /\\.(ico|svg|jpg|jpeg|png|gif|webp|avif)(\\?.*)?$/,\n }\n }\n\n /**\n * Loads audio and video and inlines them via a data URI if they are below\n * the size threshold\n */\n rules.media = (): RuleSetRule => {\n return {\n use: [loaders.url()],\n test: /\\.(mp4|webm|ogv|wav|mp3|m4a|aac|oga|flac)$/,\n }\n }\n\n /**\n * Loads assets without inlining\n */\n rules.miscAssets = (): RuleSetRule => {\n return {\n use: [loaders.file()],\n test: /\\.pdf$/,\n }\n }\n\n /**\n * CSS style loader.\n */\n {\n const css: IRuleUtils[\"css\"] = (options = {}): RuleSetRule => {\n const { browsers, ...restOptions } = options\n const use = [\n !isSSR && loaders.miniCssExtract(restOptions),\n loaders.css({ ...restOptions, importLoaders: 1 }),\n loaders.postcss({ browsers }),\n ].filter(Boolean) as RuleSetRule[\"use\"]\n\n return {\n use,\n test: /\\.css$/,\n }\n }\n\n /**\n * CSS style loader, _excludes_ node_modules.\n */\n css.internal = makeInternalOnly(css)\n css.external = makeExternalOnly(css)\n\n const cssModules: IRuleUtils[\"cssModules\"] = (options): RuleSetRule => {\n const rule = css({ ...options, modules: true })\n delete rule.exclude\n rule.test = /\\.module\\.css$/\n return rule\n }\n\n rules.css = css\n rules.cssModules = cssModules\n }\n\n /**\n * PostCSS loader.\n */\n {\n const postcss: ContextualRuleFactory = (options): RuleSetRule => {\n return {\n test: /\\.css$/,\n use: [loaders.css({ importLoaders: 1 }), loaders.postcss(options)],\n }\n }\n\n /**\n * PostCSS loader, _excludes_ node_modules.\n */\n postcss.internal = makeInternalOnly(postcss)\n postcss.external = makeExternalOnly(postcss)\n rules.postcss = postcss\n }\n /**\n * cast rules to IRuleUtils\n */\n /**\n * Plugins\n */\n const plugins = { ...builtinPlugins } as PluginUtils\n\n plugins.minifyJs = ({\n terserOptions,\n ...options\n }: {\n terserOptions?: TerserOptions\n } = {}): WebpackPluginInstance =>\n new TerserPlugin({\n exclude: /\\.min\\.js/,\n terserOptions: {\n ie8: false,\n mangle: {\n safari10: true,\n },\n parse: {\n ecma: 5,\n },\n compress: {\n ecma: 5,\n },\n output: {\n ecma: 5,\n },\n ...terserOptions,\n },\n parallel: Math.max(1, cpuCoreCount() - 1),\n ...options,\n })\n\n plugins.minifyCss = (\n options = {\n minimizerOptions: {\n preset: [\n `default`,\n {\n svgo: {\n full: true,\n plugins: [\n // potentially destructive plugins removed - see https://github.com/gatsbyjs/gatsby/issues/15629\n // use correct config format and remove plugins requiring specific params - see https://github.com/gatsbyjs/gatsby/issues/31619\n // List of default plugins and their defaults: https://github.com/svg/svgo#built-in-plugins\n // Last update 2021-08-17\n `cleanupAttrs`,\n `cleanupEnableBackground`,\n `cleanupIDs`,\n `cleanupListOfValues`, // Default: disabled\n `cleanupNumericValues`,\n `collapseGroups`,\n `convertColors`,\n `convertPathData`,\n `convertStyleToAttrs`, // Default: disabled\n `convertTransform`,\n `inlineStyles`,\n `mergePaths`,\n `minifyStyles`,\n `moveElemsAttrsToGroup`,\n `moveGroupAttrsToElems`,\n `prefixIds`, // Default: disabled\n `removeComments`,\n `removeDesc`,\n `removeDoctype`,\n `removeEditorsNSData`,\n `removeEmptyAttrs`,\n `removeEmptyContainers`,\n `removeEmptyText`,\n `removeHiddenElems`,\n `removeMetadata`,\n `removeNonInheritableGroupAttrs`,\n `removeRasterImages`, // Default: disabled\n `removeScriptElement`, // Default: disabled\n `removeStyleElement`, // Default: disabled\n `removeTitle`,\n `removeUnknownsAndDefaults`,\n `removeUnusedNS`,\n `removeUselessDefs`,\n `removeUselessStrokeAndFill`,\n `removeXMLProcInst`,\n `reusePaths`, // Default: disabled\n `sortAttrs`, // Default: disabled\n ],\n },\n },\n ],\n },\n }\n ): CssMinimizerPlugin =>\n new CssMinimizerPlugin({\n parallel: Math.max(1, cpuCoreCount() - 1),\n ...options,\n })\n\n plugins.fastRefresh = ({ modulesThatUseGatsby }): WebpackPluginInstance => {\n const regExpToHack = /node_modules/\n regExpToHack.test = (modulePath: string): boolean => {\n // when it's not coming from node_modules we treat it as a source file.\n if (!vendorRegex.test(modulePath)) {\n return false\n }\n\n // If the module uses Gatsby as a dependency\n // we want to treat it as src because of shadowing\n return !modulesThatUseGatsby.some(module =>\n modulePath.includes(module.path)\n )\n }\n\n return new ReactRefreshWebpackPlugin({\n overlay: {\n sockIntegration: `whm`,\n module: path.join(__dirname, `fast-refresh-module`),\n },\n // this is a bit hacky - exclude expect string or regexp or array of those\n // so this is tricking ReactRefreshWebpackPlugin with providing regexp with\n // overwritten .test method\n exclude: regExpToHack,\n })\n }\n\n plugins.extractText = (options: any): WebpackPluginInstance =>\n new MiniCssExtractPlugin({\n ...options,\n })\n\n plugins.moment = (): WebpackPluginInstance =>\n plugins.ignore({ resourceRegExp: /^\\.\\/locale$/, contextRegExp: /moment$/ })\n\n plugins.extractStats = (): GatsbyWebpackStatsExtractor =>\n new GatsbyWebpackStatsExtractor(publicPath)\n\n // TODO: remove this in v5\n plugins.eslintGraphqlSchemaReload = (): null => null\n\n plugins.virtualModules = (): GatsbyWebpackVirtualModules =>\n new GatsbyWebpackVirtualModules()\n\n plugins.eslint = (): WebpackPluginInstance => {\n const options = {\n extensions: [`js`, `jsx`],\n exclude: [\n `/node_modules/`,\n `/bower_components/`,\n VIRTUAL_MODULES_BASE_PATH,\n ],\n ...eslintConfig(config.jsxRuntime === `automatic`),\n }\n // @ts-ignore\n return new ESLintPlugin(options)\n }\n\n plugins.eslintRequired = (): WebpackPluginInstance => {\n const options = {\n extensions: [`js`, `jsx`],\n exclude: [\n `/node_modules/`,\n `/bower_components/`,\n VIRTUAL_MODULES_BASE_PATH,\n ],\n ...eslintRequiredConfig,\n }\n // @ts-ignore\n return new ESLintPlugin(options)\n }\n\n return {\n loaders,\n rules,\n plugins,\n }\n}\n"],"mappings":";;;;;;;AAAA;;AAIA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAKA;;AAEA;;AACA;;AAEA;;;;;;AAgJA,MAAMA,WAAW,GAAG,iCAApB;AAEA;AACA;AACA;;AACO,MAAMC,kBAAkB,GAAG,CAChCC,KADgC,EAEhCC,OAFgC,KAGd;EAClB,MAAMC,iBAAiB,GAAI,SAA3B;EACA,MAAMC,iBAAiB,GAAG,IAAAC,6BAAA,EAAgBH,OAAO,CAACI,SAAxB,CAA1B;EAEA,MAAMC,UAAU,GAAG,CAACN,KAAK,CAACO,QAAN,CAAgB,SAAhB,CAApB;EAEA,MAAMC,KAAK,GAAGR,KAAK,CAACO,QAAN,CAAgB,MAAhB,CAAd;;EACA,MAAM;IAAEE;EAAF,IAAaC,YAAA,CAAMC,QAAN,EAAnB;;EACA,MAAM;IAAEC,WAAF;IAAeC;EAAf,IAA8BJ,MAApC;EAEA,MAAMK,UAAU,GAAG,IAAAC,4BAAA,EAAc;IAAEH,WAAF;IAAeC,UAAf;IAA2B,GAAGZ;EAA9B,CAAd,CAAnB;;EAEA,MAAMe,gBAAgB,GACnBC,QAAD,IACA,CAACC,OAAO,GAAG,EAAX,KAA+B;IAC7B,MAAMC,IAAI,GAAGF,QAAQ,CAACC,OAAD,CAArB;IACAC,IAAI,CAACC,OAAL,GAAetB,WAAf;IACA,OAA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AAE,CACN,gBADM,EAEN,oBAFM,EAGPwI,sDAHO,CAFK;MAOd,GAAG,IAAAC,0BAAA,EAAatJ,MAAM,CAACkE,UAAP,KAAuB,WAApC;IAPW,CAAhB,CAD4C,CAU5C;;IACA,OAAO,IAAIqF,4BAAJ,CAAiB9I,OAAjB,CAAP;EACD,CAZD;;EAcAqC,OAAO,CAAC0G,cAAR,GAAyB,MAA6B;IACpD,MAAM/I,OAAO,GAAG;MACd2I,UAAU,EAAE,CAAE,IAAF,EAAQ,KAAR,CADE;MAEdvI,OAAO,EAAE,CACN,gBADM,EAEN,oBAFM,EAGPwI,sDAHO,CAFK;MAOd,GAAGI;IAPW,CAAhB,CADoD,CAUpD;;IACA,OAAO,IAAIF,4BAAJ,CAAiB9I,OAAjB,CAAP;EACD,CAZD;;EAcA,OAAO;IACLW,OADK;IAELqD,KAFK;IAGL3B;EAHK,CAAP;AAKD,CAlqBM"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "gatsby",
3
3
  "description": "Blazing fast modern site generator for React",
4
- "version": "5.3.2",
4
+ "version": "5.3.3",
5
5
  "author": "Kyle Mathews <mathews.kyle@gmail.com>",
6
6
  "bin": {
7
7
  "gatsby": "./cli.js"
@@ -277,5 +277,5 @@
277
277
  "yargs": {
278
278
  "boolean-negation": false
279
279
  },
280
- "gitHead": "98cbee12f2f8a303b11c338fa3f980cb6c5f5d6c"
280
+ "gitHead": "da692c77a711bccec2866d863c0f221f81a7dc2c"
281
281
  }