gdu 4.0.0-next.13 → 4.0.0-next.14

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # gdu
2
2
 
3
+ ## 4.0.0-next.14
4
+
5
+ ### Patch Changes
6
+
7
+ - GDU: Exposes naked nextjs configs
8
+
3
9
  ## 4.0.0-next.13
4
10
 
5
11
  ### Patch Changes
@@ -1 +1,13 @@
1
- export declare const createNextJSConfig: () => {};
1
+ export declare const withTM: (nextConfig?: {}) => {};
2
+ export declare const createNextJSConfig: () => {
3
+ reactStrictMode: boolean;
4
+ experimental: {
5
+ esmExternals: boolean;
6
+ externalDir: boolean;
7
+ };
8
+ images: {
9
+ domains: string[];
10
+ };
11
+ webpack: (defaultConfig: any) => any;
12
+ };
13
+ export declare const createNextJSTranspiledConfig: () => any;
@@ -22,7 +22,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
22
22
  return (mod && mod.__esModule) ? mod : { "default": mod };
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.createNextJSConfig = void 0;
25
+ exports.createNextJSTranspiledConfig = exports.createNextJSConfig = exports.withTM = void 0;
26
26
  const roots_1 = require("../lib/roots");
27
27
  const path_1 = __importStar(require("path"));
28
28
  const webpack_1 = require("webpack");
@@ -30,9 +30,9 @@ const misc_1 = require("../lib/misc");
30
30
  const dotenv_webpack_1 = __importDefault(require("dotenv-webpack"));
31
31
  const next_transpile_modules_1 = __importDefault(require("next-transpile-modules"));
32
32
  const configs_1 = require("../utils/configs");
33
- const webpack_plugin_1 = require("@vanilla-extract/webpack-plugin");
34
- const loaders_1 = require("next/dist/build/webpack/config/blocks/css/loaders");
35
- const withTM = next_transpile_modules_1.default([
33
+ const next_plugin_1 = require("@vanilla-extract/next-plugin");
34
+ const withVanillaExtract = next_plugin_1.createVanillaExtractPlugin();
35
+ exports.withTM = next_transpile_modules_1.default([
36
36
  '@autoguru/themes',
37
37
  '@autoguru/overdrive',
38
38
  '@autoguru/icons',
@@ -46,7 +46,7 @@ const withTM = next_transpile_modules_1.default([
46
46
  ]);
47
47
  const createNextJSConfig = () => {
48
48
  const isDev = !misc_1.isEnvProduction();
49
- return withTM({
49
+ return {
50
50
  reactStrictMode: true,
51
51
  experimental: {
52
52
  esmExternals: false,
@@ -55,24 +55,7 @@ const createNextJSConfig = () => {
55
55
  images: {
56
56
  domains: ['cdn.autoguru.com.au'],
57
57
  },
58
- webpack: (defaultConfig, options) => {
59
- const { dev, isServer } = options;
60
- const cssRules = defaultConfig.module.rules.find((rule) => Array.isArray(rule.oneOf) &&
61
- rule.oneOf.some(({ test }) => typeof test === 'object' &&
62
- typeof test.test === 'function' &&
63
- test.test('filename.css'))).oneOf;
64
- cssRules.unshift({
65
- test: /\.vanilla\.css$/i,
66
- sideEffects: true,
67
- use: loaders_1.getGlobalCssLoader({
68
- assetPrefix: defaultConfig.assetPrefix,
69
- isClient: !isServer,
70
- isServer,
71
- isDevelopment: dev,
72
- future: defaultConfig.future || {},
73
- experimental: defaultConfig.experimental || {},
74
- }, [], []),
75
- });
58
+ webpack: (defaultConfig) => {
76
59
  defaultConfig.plugins.push(new webpack_1.DefinePlugin({
77
60
  __DEV__: isDev,
78
61
  }));
@@ -90,9 +73,10 @@ const createNextJSConfig = () => {
90
73
  defaultConfig.resolve.alias['react-dom'] = path_1.resolve(roots_1.PROJECT_ROOT, '../../', 'node_modules/react-dom/');
91
74
  defaultConfig.resolve.alias['@autoguru/icons'] = path_1.resolve(roots_1.PROJECT_ROOT, '../../', 'node_modules/@autoguru/icons/');
92
75
  defaultConfig.resolve.alias['next'] = path_1.resolve(roots_1.PROJECT_ROOT, '../../', 'node_modules/next/');
93
- defaultConfig.plugins.push(new webpack_plugin_1.VanillaExtractPlugin());
94
76
  return defaultConfig;
95
77
  },
96
- });
78
+ };
97
79
  };
98
80
  exports.createNextJSConfig = createNextJSConfig;
81
+ const createNextJSTranspiledConfig = () => withVanillaExtract(exports.withTM(exports.createNextJSConfig()));
82
+ exports.createNextJSTranspiledConfig = createNextJSTranspiledConfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gdu",
3
- "version": "4.0.0-next.13",
3
+ "version": "4.0.0-next.14",
4
4
  "private": false,
5
5
  "description": "AutoGuru's development toolkit",
6
6
  "homepage": "https://github.com/autoguru-au/octane/tree/master/packages/gdu#readme",