@afterpack/webpack 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 +2 -0
- package/dist/index.js +3 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -159,6 +159,7 @@ var AfterpackWebpackPlugin = class {
|
|
|
159
159
|
for (const message of this.captureDiagnostics) console.warn(`[afterpack-webpack] directive ${message}`);
|
|
160
160
|
this.captureDiagnostics.length = 0;
|
|
161
161
|
const devtool = compiler.options.devtool;
|
|
162
|
+
const outputModule = compiler.options.output?.module === true;
|
|
162
163
|
const result = await (0, __afterpack_integration_utils.runObfuscationPass)({
|
|
163
164
|
files,
|
|
164
165
|
inputs,
|
|
@@ -181,6 +182,7 @@ var AfterpackWebpackPlugin = class {
|
|
|
181
182
|
options: this.settings,
|
|
182
183
|
engineConfig: this.engineConfig
|
|
183
184
|
}),
|
|
185
|
+
sourceType: (0, __afterpack_integration_utils.sourceTypeForOutputFormat)(outputModule ? "module" : void 0),
|
|
184
186
|
hasBundlerSourcemap: typeof devtool === "string" && devtool.includes("source-map"),
|
|
185
187
|
messages: { autoEnableBundlerSourcemap: "protectionMap:true but no bundler sourcemap was found; set `devtool: 'source-map'` so future builds can render original source in the map." }
|
|
186
188
|
});
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { readFileSync } from "node:fs";
|
|
2
2
|
import { basename, join, relative } from "node:path";
|
|
3
3
|
import { processBatch, version } from "@afterpack/core";
|
|
4
|
-
import { createTelemetryReporter, decodeDataUri, extractSourceMappingURL, passSettings, resolveClientIdentity, resolvePluginConfig, runObfuscationPass, scanDirectives, withSourceMappingURL, withoutCssSourceMappingURL, writeDeferredProtectionReceipt } from "@afterpack/integration-utils";
|
|
4
|
+
import { createTelemetryReporter, decodeDataUri, extractSourceMappingURL, passSettings, resolveClientIdentity, resolvePluginConfig, runObfuscationPass, scanDirectives, sourceTypeForOutputFormat, withSourceMappingURL, withoutCssSourceMappingURL, writeDeferredProtectionReceipt } from "@afterpack/integration-utils";
|
|
5
5
|
|
|
6
6
|
//#region src/index.ts
|
|
7
7
|
const PLUGIN_NAME = "AfterpackWebpackPlugin";
|
|
@@ -136,6 +136,7 @@ var AfterpackWebpackPlugin = class {
|
|
|
136
136
|
for (const message of this.captureDiagnostics) console.warn(`[afterpack-webpack] directive ${message}`);
|
|
137
137
|
this.captureDiagnostics.length = 0;
|
|
138
138
|
const devtool = compiler.options.devtool;
|
|
139
|
+
const outputModule = compiler.options.output?.module === true;
|
|
139
140
|
const result = await runObfuscationPass({
|
|
140
141
|
files,
|
|
141
142
|
inputs,
|
|
@@ -158,6 +159,7 @@ var AfterpackWebpackPlugin = class {
|
|
|
158
159
|
options: this.settings,
|
|
159
160
|
engineConfig: this.engineConfig
|
|
160
161
|
}),
|
|
162
|
+
sourceType: sourceTypeForOutputFormat(outputModule ? "module" : void 0),
|
|
161
163
|
hasBundlerSourcemap: typeof devtool === "string" && devtool.includes("source-map"),
|
|
162
164
|
messages: { autoEnableBundlerSourcemap: "protectionMap:true but no bundler sourcemap was found; set `devtool: 'source-map'` so future builds can render original source in the map." }
|
|
163
165
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@afterpack/webpack",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "webpack plugin for AfterPack: obfuscate your production JavaScript during the webpack build",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"webpack": "^5.0.0"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@afterpack/core": "~0.2.
|
|
32
|
-
"@afterpack/integration-utils": "0.2.
|
|
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",
|