@vyriy/webpack-config 0.1.13 → 0.1.16
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 +17 -2
- package/csr.d.ts +2 -2
- package/index.d.ts +1 -0
- package/package.json +3 -3
- package/ssr.d.ts +2 -2
- package/types.d.ts +4 -0
package/README.md
CHANGED
|
@@ -64,17 +64,32 @@ export default csr(
|
|
|
64
64
|
clean: true,
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
optimization: {
|
|
68
|
+
splitChunks: true,
|
|
69
69
|
},
|
|
70
70
|
},
|
|
71
71
|
);
|
|
72
72
|
```
|
|
73
73
|
|
|
74
|
+
With types:
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
import { csr, type WebpackConfig } from '@vyriy/webpack-config';
|
|
78
|
+
|
|
79
|
+
const config: WebpackConfig = csr('./src/index.tsx', {
|
|
80
|
+
path: '/absolute/path/to/dist/client',
|
|
81
|
+
filename: 'index.js',
|
|
82
|
+
clean: true,
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
export default config;
|
|
86
|
+
```
|
|
87
|
+
|
|
74
88
|
## API
|
|
75
89
|
|
|
76
90
|
- `csr(entry, output, config?)` creates a browser-oriented Webpack config.
|
|
77
91
|
- `ssr(entry, output, config?)` creates a node-oriented SSR Webpack config.
|
|
92
|
+
- `WebpackConfig`, `WebpackEntry`, and `WebpackOutput` expose the shared config helper types.
|
|
78
93
|
|
|
79
94
|
Shared defaults:
|
|
80
95
|
|
package/csr.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const csr: (entry:
|
|
1
|
+
import type { WebpackConfig, WebpackEntry, WebpackOutput } from './types.js';
|
|
2
|
+
export declare const csr: (entry: WebpackEntry, output: WebpackOutput, config?: WebpackConfig) => WebpackConfig;
|
package/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vyriy/webpack-config",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
4
4
|
"description": "Shared Webpack config for Vyriy projects",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"@babel/preset-typescript": "^7.28.5",
|
|
13
13
|
"@babel/runtime": "^7.29.2",
|
|
14
14
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.6.2",
|
|
15
|
-
"@vyriy/env": "0.1.
|
|
16
|
-
"@vyriy/path": "0.1.
|
|
15
|
+
"@vyriy/env": "0.1.16",
|
|
16
|
+
"@vyriy/path": "0.1.16",
|
|
17
17
|
"babel-loader": "^10.1.1",
|
|
18
18
|
"css-loader": "^7.1.4",
|
|
19
19
|
"cssnano": "^8.0.1",
|
package/ssr.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const ssr: (entry:
|
|
1
|
+
import type { WebpackConfig, WebpackEntry, WebpackOutput } from './types.js';
|
|
2
|
+
export declare const ssr: (entry: WebpackEntry, output: WebpackOutput, config?: WebpackConfig) => WebpackConfig;
|
package/types.d.ts
ADDED