@best-shot/preset-web 0.12.15 → 0.12.17

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.
Files changed (2) hide show
  1. package/index.mjs +2 -4
  2. package/package.json +2 -2
package/index.mjs CHANGED
@@ -29,15 +29,14 @@ export function apply({ config: { html, vendors, optimization = {} } }) {
29
29
  .when(minimize, setOutputName({ style: addMin, script: addMin }))
30
30
  .when(!hot, setOutputName({ style: addHash, script: addHash }))
31
31
  .when(
32
- optimization.splitChunks !== false || optimization.runtimeChunk,
32
+ optimization.splitChunks !== false ||
33
+ chain.optimization.get('runtimeChunk'),
33
34
  setOutputName({
34
35
  script: (filename) => `script/${filename}`,
35
36
  style: (filename) => `style/${filename}`,
36
37
  }),
37
38
  );
38
39
 
39
- chain.optimization.runtimeChunk(optimization.runtimeChunk);
40
-
41
40
  if (optimization.splitChunks !== false) {
42
41
  await splitChunks({ vendors })(chain);
43
42
  }
@@ -125,7 +124,6 @@ export const schema = {
125
124
  properties: {
126
125
  runtimeChunk: {
127
126
  default: true,
128
- anyOf: [{ type: 'boolean' }, { type: 'string' }],
129
127
  },
130
128
  splitChunks: {
131
129
  type: 'boolean',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@best-shot/preset-web",
3
- "version": "0.12.15",
3
+ "version": "0.12.17",
4
4
  "description": "A `best-shot` preset for web project",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -47,7 +47,7 @@
47
47
  "webpack": "^5.89.0"
48
48
  },
49
49
  "engines": {
50
- "node": "^16.15.0 || ^18.12.0"
50
+ "node": "^16.15.0 || ^18.12.0 || ^20.0.0"
51
51
  },
52
52
  "publishConfig": {
53
53
  "access": "public",