sku 13.0.2 → 13.0.4
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 +18 -0
- package/config/storybook/storybookWebpackConfig.js +29 -4
- package/lib/configure.js +2 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# sku
|
|
2
2
|
|
|
3
|
+
## 13.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fixes a bug preventing `.mdx` files from loading in Storybook when using `sku`'s `webpackFinal` Storybook configuration ([#1032](https://github.com/seek-oss/sku/pull/1032))
|
|
8
|
+
|
|
9
|
+
## 13.0.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Fix incorrect path in ignore files when running `sku init` ([#1028](https://github.com/seek-oss/sku/pull/1028))
|
|
14
|
+
|
|
15
|
+
sku generates ignore files (e.g. `.eslintignore`) for the project.
|
|
16
|
+
When ran as part of `sku init`, the current working directory (CWD) would sometimes be incorrect.
|
|
17
|
+
It should now give the same result as `sku configure`.
|
|
18
|
+
|
|
19
|
+
This change includes a refactor to how the webpack target directory is set in ignore files.
|
|
20
|
+
|
|
3
21
|
## 13.0.2
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -5,6 +5,9 @@ const { resolvePackage } = require('../webpack/utils/resolvePackage');
|
|
|
5
5
|
|
|
6
6
|
const hot = process.env.SKU_HOT !== 'false';
|
|
7
7
|
|
|
8
|
+
const EXAMPLE_CSS_FILE = 'example.css';
|
|
9
|
+
const EXAMPLE_MDX_FILE = 'example.mdx';
|
|
10
|
+
|
|
8
11
|
/**
|
|
9
12
|
* @param {import("webpack").Configuration} config
|
|
10
13
|
* @param {{isDevServer: boolean}}
|
|
@@ -24,11 +27,33 @@ module.exports = (config, { isDevServer }) => {
|
|
|
24
27
|
...(Array.isArray(previousExclude)
|
|
25
28
|
? previousExclude
|
|
26
29
|
: [previousExclude]), // Ensure we don't clobber any existing exclusions
|
|
27
|
-
...paths.src,
|
|
28
|
-
...paths.compilePackages.map(resolvePackage),
|
|
29
|
-
/\.vanilla\.css$/, // Vanilla Extract virtual modules
|
|
30
|
-
/\.css$/, // external CSS
|
|
31
30
|
];
|
|
31
|
+
|
|
32
|
+
if (rule.test instanceof RegExp) {
|
|
33
|
+
// Only exclude sku app source code and compile packages if the rule is not for MDX files
|
|
34
|
+
if (!rule.test.test(EXAMPLE_MDX_FILE)) {
|
|
35
|
+
rule.exclude.push(
|
|
36
|
+
...paths.src,
|
|
37
|
+
...paths.compilePackages.map(resolvePackage),
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// Only exclude vanilla extract virtual CSS files if the rule is for CSS files
|
|
42
|
+
if (rule.test.test(EXAMPLE_CSS_FILE)) {
|
|
43
|
+
rule.exclude.push(
|
|
44
|
+
/\.vanilla\.css$/, // Vanilla Extract virtual modules
|
|
45
|
+
/\.css$/, // external CSS
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
} else {
|
|
49
|
+
// To be safe, exclude everything if the rule's test isn't a RegExp
|
|
50
|
+
rule.exclude.push(
|
|
51
|
+
...paths.src,
|
|
52
|
+
...paths.compilePackages.map(resolvePackage),
|
|
53
|
+
/\.vanilla\.css$/, // Vanilla Extract virtual modules
|
|
54
|
+
/\.css$/, // external CSS
|
|
55
|
+
);
|
|
56
|
+
}
|
|
32
57
|
});
|
|
33
58
|
}
|
|
34
59
|
|
package/lib/configure.js
CHANGED
|
@@ -4,7 +4,7 @@ const { writeFile, rm } = require('node:fs/promises');
|
|
|
4
4
|
const path = require('node:path');
|
|
5
5
|
|
|
6
6
|
const ensureGitignore = require('ensure-gitignore');
|
|
7
|
-
const {
|
|
7
|
+
const { getPathFromCwd } = require('./cwd');
|
|
8
8
|
|
|
9
9
|
const { paths, httpsDevServer, languages } = require('../context');
|
|
10
10
|
const {
|
|
@@ -32,9 +32,7 @@ const writeFileToCWD = async (fileName, content, { banner = true } = {}) => {
|
|
|
32
32
|
|
|
33
33
|
module.exports = async () => {
|
|
34
34
|
// Ignore target directories
|
|
35
|
-
const webpackTargetDirectory = addSep(
|
|
36
|
-
paths.target.replace(addSep(cwd()), ''),
|
|
37
|
-
);
|
|
35
|
+
const webpackTargetDirectory = addSep(paths.relativeTarget);
|
|
38
36
|
|
|
39
37
|
const gitIgnorePatterns = [
|
|
40
38
|
// Ignore webpack bundle report output
|