@afterpack/vite 0.2.1 → 0.2.3

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.cjs CHANGED
@@ -75,7 +75,7 @@ function afterpackVite(options = {}) {
75
75
  },
76
76
  generateBundle: {
77
77
  order: "post",
78
- async handler(_outputOptions, bundle) {
78
+ async handler(outputOptions, bundle) {
79
79
  if (!autorun) return;
80
80
  if (!outDir) return;
81
81
  const startedAt = Date.now();
@@ -118,6 +118,7 @@ function afterpackVite(options = {}) {
118
118
  afterpackDir: leg ? (0, node_path.join)(projectRoot, ".afterpack", leg) : (0, node_path.join)(projectRoot, ".afterpack")
119
119
  },
120
120
  ...(0, __afterpack_integration_utils.passSettings)(resolved),
121
+ sourceType: (0, __afterpack_integration_utils.sourceTypeForBundle)(outputOptions.format, entries.values()),
121
122
  hasBundlerSourcemap: buildSourcemap,
122
123
  messages: { autoEnableBundlerSourcemap: "protectionMap:true but no bundler sourcemap was found; enabled build.sourcemap so future builds can render original source in the map." }
123
124
  });
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { join, resolve } from "node:path";
2
2
  import { processBatch, version } from "@afterpack/core";
3
- import { applyBundleOutput, collectBundleJs, createTelemetryReporter, passSettings, resolveClientIdentity, resolvePluginConfig, runObfuscationPass, scanDirectives, stripBundleCssSourceMaps, writeDeferredProtectionReceipt } from "@afterpack/integration-utils";
3
+ import { applyBundleOutput, collectBundleJs, createTelemetryReporter, passSettings, resolveClientIdentity, resolvePluginConfig, runObfuscationPass, scanDirectives, sourceTypeForBundle, stripBundleCssSourceMaps, writeDeferredProtectionReceipt } from "@afterpack/integration-utils";
4
4
 
5
5
  //#region src/index.ts
6
6
  const LOCAL_KEYS = ["leg", "projectRoot"];
@@ -52,7 +52,7 @@ function afterpackVite(options = {}) {
52
52
  },
53
53
  generateBundle: {
54
54
  order: "post",
55
- async handler(_outputOptions, bundle) {
55
+ async handler(outputOptions, bundle) {
56
56
  if (!autorun) return;
57
57
  if (!outDir) return;
58
58
  const startedAt = Date.now();
@@ -95,6 +95,7 @@ function afterpackVite(options = {}) {
95
95
  afterpackDir: leg ? join(projectRoot, ".afterpack", leg) : join(projectRoot, ".afterpack")
96
96
  },
97
97
  ...passSettings(resolved),
98
+ sourceType: sourceTypeForBundle(outputOptions.format, entries.values()),
98
99
  hasBundlerSourcemap: buildSourcemap,
99
100
  messages: { autoEnableBundlerSourcemap: "protectionMap:true but no bundler sourcemap was found; enabled build.sourcemap so future builds can render original source in the map." }
100
101
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@afterpack/vite",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "Vite plugin for AfterPack: obfuscate your production JavaScript during vite build",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -28,8 +28,8 @@
28
28
  "vite": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0"
29
29
  },
30
30
  "dependencies": {
31
- "@afterpack/core": "~0.2.2",
32
- "@afterpack/integration-utils": "0.2.1"
31
+ "@afterpack/core": "~0.2.4",
32
+ "@afterpack/integration-utils": "0.2.3"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@biomejs/biome": "2.4.4",