sku 11.8.0 → 11.8.2

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,19 @@
1
1
  # sku
2
2
 
3
+ ## 11.8.2
4
+
5
+ ### Patch Changes
6
+
7
+ - start-ssr: Enable `devServerMiddleware` to serve static assets ([#765](https://github.com/seek-oss/sku/pull/765))
8
+
9
+ Apply `devServerMiddleware` before sku static asset middleware, to support consumers serving custom static assets.
10
+
11
+ ## 11.8.1
12
+
13
+ ### Patch Changes
14
+
15
+ - Re-add `@types/jest` as a dependency ([#757](https://github.com/seek-oss/sku/pull/757))
16
+
3
17
  ## 11.8.0
4
18
 
5
19
  ### Minor Changes
@@ -24,13 +24,6 @@ const startCallback = () => {
24
24
  }
25
25
  };
26
26
 
27
- if (__SKU_DEV_MIDDLEWARE_ENABLED__) {
28
- const devServerMiddleware = require(__SKU_DEV_MIDDLEWARE_PATH__);
29
- if (devServerMiddleware && typeof devServerMiddleware === 'function') {
30
- devServerMiddleware(app);
31
- }
32
- }
33
-
34
27
  let server;
35
28
 
36
29
  if (__SKU_DEV_HTTPS__) {
@@ -18,6 +18,17 @@ const app = express();
18
18
  const env = process.env.NODE_ENV || 'development';
19
19
 
20
20
  if (env === 'development') {
21
+ if (__SKU_DEV_MIDDLEWARE_ENABLED__) {
22
+ const devServerMiddleware = require(__SKU_DEV_MIDDLEWARE_PATH__);
23
+ if (devServerMiddleware && typeof devServerMiddleware === 'function') {
24
+ // Allow specific static files to be handled earlier via middleware.
25
+ // E.g. web fonts, etc.
26
+ devServerMiddleware(app);
27
+ }
28
+ }
29
+
30
+ // Fallthrough to serve any static file requests from root
31
+ // E.g. compiled output files and images
21
32
  app.use(express.static(path.join(__dirname, './')));
22
33
  }
23
34
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sku",
3
- "version": "11.8.0",
3
+ "version": "11.8.2",
4
4
  "description": "Front-end development toolkit, powered by Webpack, Babel, CSS Modules, Less and Jest",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -41,6 +41,7 @@
41
41
  "@storybook/builder-webpack5": "^6.5.12",
42
42
  "@storybook/manager-webpack5": "^6.5.12",
43
43
  "@storybook/react": "^6.5.12",
44
+ "@types/jest": "^29.0.0",
44
45
  "@types/loadable__component": "^5.13.1",
45
46
  "@vanilla-extract/jest-transform": "^1.1.0",
46
47
  "@vanilla-extract/webpack-plugin": "^2.2.0",