@kitsy/cnos-webpack 1.5.0 → 1.5.1
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 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -3,3 +3,14 @@
|
|
|
3
3
|
Webpack integration for CNOS.
|
|
4
4
|
|
|
5
5
|
It resolves CNOS public config during webpack startup, injects `process.env.*` define replacements for promoted public values, and embeds `globalThis.__CNOS_BROWSER_DATA__` for `@kitsy/cnos/browser`.
|
|
6
|
+
|
|
7
|
+
Webpack uses an empty public env prefix by default. Configure `public.frameworks.webpack` in your manifest or pass `prefix` to the plugin if you want names such as `APP_*`.
|
|
8
|
+
|
|
9
|
+
Recommended plugin order:
|
|
10
|
+
- `new CnosWebpackPlugin(...)`
|
|
11
|
+
- `new HtmlWebpackPlugin(...)`
|
|
12
|
+
- `new MiniCssExtractPlugin(...)`
|
|
13
|
+
- `new CopyPlugin(...)`
|
|
14
|
+
- `new ESLintPlugin(...)`
|
|
15
|
+
|
|
16
|
+
If your webpack config is CommonJS, load CNOS via dynamic `import()` inside an async `module.exports = async () => ...` factory. If webpack loads your config as ESM, `require(...)` is not available.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kitsy/cnos-webpack",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"description": "Webpack integration for CNOS public config injection.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"access": "public"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@kitsy/cnos": "1.5.
|
|
38
|
+
"@kitsy/cnos": "1.5.1"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"webpack": ">=5"
|