@afterpack/webpack 0.1.0 → 0.2.0-rc.20260930T1421
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/README.md +11 -9
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -25,7 +25,8 @@ The plugin obfuscates each JavaScript asset your chunks produce at the last step
|
|
|
25
25
|
writes to disk, so the readable bundle is never written. Hot-update chunks and assets other plugins
|
|
26
26
|
copy in are left alone. If obfuscation fails, the build fails.
|
|
27
27
|
|
|
28
|
-
Subresource integrity plugins
|
|
28
|
+
Subresource integrity plugins such as `webpack-subresource-integrity` are not supported: they hash
|
|
29
|
+
each chunk before AfterPack rewrites it, so the recorded hashes would not match the files you ship.
|
|
29
30
|
|
|
30
31
|
Each build writes a protection receipt, `.afterpack-protection.json`, into the output directory.
|
|
31
32
|
Run `npx afterpack verify dist` in your deploy step to check that what you ship is what was
|
|
@@ -58,12 +59,12 @@ other option is in the [configuration reference](https://www.afterpack.dev/docs/
|
|
|
58
59
|
[protectionMap.enabled]: https://www.afterpack.dev/docs/config#protectionMap-enabled
|
|
59
60
|
[build.autorun]: https://www.afterpack.dev/docs/config#build-autorun
|
|
60
61
|
|
|
61
|
-
`/* @afterpack */` [directives](https://www.afterpack.dev/docs/directives)
|
|
62
|
-
|
|
63
|
-
tells you.
|
|
62
|
+
`/* @afterpack */` [directives](https://www.afterpack.dev/docs/directives) that raise protection for
|
|
63
|
+
a region are a [Pro](https://www.afterpack.dev/docs/pro) feature. They need a `devtool` that emits
|
|
64
|
+
source maps, such as `"source-map"`. Without one, the plugin skips them and tells you.
|
|
64
65
|
|
|
65
66
|
The [Protection Map](https://www.afterpack.dev/docs/protection-map) is written to `.afterpack/`,
|
|
66
|
-
outside webpack's output
|
|
67
|
+
outside webpack's output; that directory carries its own `.gitignore` and self-ignores. It contains
|
|
67
68
|
your original source, so never deploy or commit it.
|
|
68
69
|
|
|
69
70
|
Options can also live in `afterpack.json` or in `AFTERPACK_*` environment variables. The options
|
|
@@ -72,11 +73,12 @@ build and names the right spelling.
|
|
|
72
73
|
|
|
73
74
|
## Pro
|
|
74
75
|
|
|
75
|
-
Without a key, AfterPack runs on your machine
|
|
76
|
+
Without a key, AfterPack runs on your machine with the full pipeline at any preset. Set
|
|
76
77
|
[`AFTERPACK_KEY`](https://www.afterpack.dev/docs/config#key) in your environment and the same plugin
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
builds in AfterPack's cloud instead, which adds per-region
|
|
79
|
+
[directives](https://www.afterpack.dev/docs/directives) and two hardening transforms you can turn
|
|
80
|
+
on: self-integrity (anti-tamper) and comparison hardening. Keep the key out of your webpack config:
|
|
81
|
+
the plugin rejects it there. See [AfterPack Pro](https://www.afterpack.dev/docs/pro).
|
|
80
82
|
|
|
81
83
|
## Not supported here
|
|
82
84
|
|
package/dist/index.cjs
CHANGED
|
@@ -159,7 +159,7 @@ var AfterpackWebpackPlugin = class {
|
|
|
159
159
|
client: (0, __afterpack_integration_utils.resolveClientIdentity)(require("url").pathToFileURL(__filename).href),
|
|
160
160
|
telemetry: (0, __afterpack_integration_utils.createTelemetryReporter)(),
|
|
161
161
|
label: "afterpack-webpack",
|
|
162
|
-
|
|
162
|
+
cwd: context,
|
|
163
163
|
startedAt,
|
|
164
164
|
capturedByFile: capturedByFile.size > 0 ? capturedByFile : void 0,
|
|
165
165
|
combinedProtectionMap: {
|
package/dist/index.js
CHANGED
|
@@ -136,7 +136,7 @@ var AfterpackWebpackPlugin = class {
|
|
|
136
136
|
client: resolveClientIdentity(import.meta.url),
|
|
137
137
|
telemetry: createTelemetryReporter(),
|
|
138
138
|
label: "afterpack-webpack",
|
|
139
|
-
|
|
139
|
+
cwd: context,
|
|
140
140
|
startedAt,
|
|
141
141
|
capturedByFile: capturedByFile.size > 0 ? capturedByFile : void 0,
|
|
142
142
|
combinedProtectionMap: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@afterpack/webpack",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0-rc.20260930T1421",
|
|
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.
|
|
32
|
-
"@afterpack/integration-utils": "0.
|
|
31
|
+
"@afterpack/core": "~0.2.0",
|
|
32
|
+
"@afterpack/integration-utils": "0.2.0-rc.20260930T1421"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@biomejs/biome": "2.4.4",
|