@into-mini/sfc-split-plugin 0.6.0 → 0.6.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/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { AddWxsPlugin } from "./plugin/add-wxs.mjs";
2
2
  import { ExposeEntryNamePlugin } from "./plugin/expose-entry.mjs";
3
- // import { EntryRenamePlugin } from './plugin/entry-rename.mts';
3
+ import { EntryRenamePlugin } from "./plugin/entry-rename.mjs";
4
4
  import { MinaRuntimeWebpackPlugin } from "./plugin/mina-runtime.mjs";
5
5
  export class SfcSplitPlugin {
6
6
  options;
@@ -17,10 +17,10 @@ export class SfcSplitPlugin {
17
17
  new AddWxsPlugin().apply(compiler);
18
18
  new MinaRuntimeWebpackPlugin().apply(compiler);
19
19
  new ExposeEntryNamePlugin().apply(compiler);
20
- // new EntryRenamePlugin({
21
- // issuer: /\.vue$/,
22
- // test: /\.wxml|json/,
23
- // }).apply(compiler);
20
+ new EntryRenamePlugin({
21
+ issuer: /\.vue$/,
22
+ test: /\.wxml|json/,
23
+ }).apply(compiler);
24
24
  }
25
25
  }
26
26
  }
@@ -56,7 +56,7 @@ export default function loader(source) {
56
56
  this.cacheable();
57
57
  const callback = this.async();
58
58
  const { entryName: thisEntryName } = this;
59
- const config = JSON.parse(source);
59
+ const config = JSON.parse(source.trim() || '{}');
60
60
  const { rootContext, context } = this;
61
61
  function toThis(entryName) {
62
62
  return slash(relative(`/${thisEntryName}/..`, `/${entryName}`));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@into-mini/sfc-split-plugin",
3
- "version": "0.6.0",
3
+ "version": "0.6.2",
4
4
  "license": "MIT",
5
5
  "keywords": [
6
6
  "loader",
@@ -28,14 +28,12 @@
28
28
  ],
29
29
  "type": "module",
30
30
  "dependencies": {
31
- "mini-css-extract-plugin": "^2.9.4",
32
31
  "slash": "^5.1.0",
33
- "webpack-virtual-modules": "^0.6.2",
34
32
  "yaml": "^2.8.2",
35
- "@into-mini/clsx": "^0.1.0",
36
- "@into-mini/sfc-split-loader": "^0.2.6",
33
+ "@into-mini/clsx": "^0.1.1",
34
+ "@into-mini/sfc-split-loader": "^0.3.3",
37
35
  "@into-mini/wxml-loader": "^0.0.0",
38
- "@into-mini/sfc-transformer": "^0.6.3"
36
+ "@into-mini/sfc-transformer": "^0.6.5"
39
37
  },
40
38
  "peerDependencies": {
41
39
  "webpack": "^5.104.0"