@razerspine/webpack-core 1.1.6 → 1.1.7

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +129 -0
  2. package/README.md +86 -10
  3. package/package.json +3 -3
package/CHANGELOG.md ADDED
@@ -0,0 +1,129 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented in this file.
4
+
5
+ This package went through an intensive stabilization phase while integrating
6
+ Webpack, pug-plugin, and template-driven builds. Multiple patch releases were
7
+ required to ensure correct behavior in both development and production modes.
8
+
9
+ ---
10
+
11
+ ## [1.1.7] - 2026-02-11
12
+
13
+ ### Changed
14
+ - Updated `README.md`
15
+ - Updated `package.json` metadata (keywords, published files)
16
+
17
+ ### Stable Release Note
18
+ - **Important:** Versions prior to 1.1.6 were part of a stabilization phase and are not recommended for production use. This release marks the stable baseline.
19
+
20
+
21
+ ## [1.1.6] - 2026-02-05
22
+
23
+ ### Changed
24
+ - Updated `package.json` metadata (keywords, published files)
25
+ - Updated `README.md`
26
+
27
+ ---
28
+
29
+ ## [1.1.5] - 2026-02-05
30
+
31
+ ### Fixed
32
+ - Stabilized production webpack configuration for pug-plugin driven builds
33
+ - Disabled `splitChunks` and `runtimeChunk` to prevent asset resolution issues
34
+ - Ensured predictable output structure in production mode
35
+ - Reduced risk of entry-related build failures
36
+
37
+ ### Notes
38
+ - This release finalizes the stabilization phase of the production configuration
39
+ - Recommended as a stable baseline for template usage
40
+
41
+ ---
42
+
43
+ ## [1.1.4] - 2026-02-05
44
+
45
+ ### Fixed
46
+ - Final stabilization of production configuration
47
+ - Ensured consistent build behavior for pug-plugin driven templates
48
+
49
+ ---
50
+
51
+ ## [1.1.0 – 1.1.3] - 2026-02-05
52
+
53
+ ### Fixed
54
+ - Multiple fixes for production configuration edge cases
55
+ - Improved compatibility between pug-plugin, assets loader, and webpack optimization
56
+ - Stabilized production builds for template-driven entry points
57
+
58
+ ---
59
+
60
+ ## [1.0.9] - 2026-02-05
61
+
62
+ ### Fixed
63
+ - Removed implicit webpack entry from production config
64
+ - Fixed production build failure caused by default webpack entry resolution
65
+
66
+ ---
67
+
68
+ ## [1.0.8] - 2026-02-05
69
+
70
+ ### Fixed
71
+ - Fixed `resolve.alias` handling across loaders and pug-plugin
72
+
73
+ ---
74
+
75
+ ## [1.0.7] - 2026-02-05
76
+
77
+ ### Fixed
78
+ - Fixed Pug asset resolution in production mode
79
+ - Passed webpack `resolve.alias` into pug-plugin resolver
80
+ - Ensured consistent alias behavior in development and production
81
+
82
+ ---
83
+
84
+ ## [1.0.6] - 2026-02-05
85
+
86
+ ### Fixed
87
+ - Fixed webpack plugin instance mismatch when used via `npm link`
88
+ - Moved `webpack-dev-server` and `pug-plugin` to `peerDependencies`
89
+ - Ensured a single webpack instance is used in consumer templates
90
+
91
+ ---
92
+
93
+ ## [1.0.5] - 2026-02-04
94
+
95
+ ### Fixed
96
+ - Explicitly disabled webpack default entry (`./src`)
97
+ - Ensured stable behavior when using pug-plugin as the primary entry system
98
+
99
+ ---
100
+
101
+ ## [1.0.4] - 2026-02-04
102
+
103
+ ### Fixed
104
+ - Fixed TypeScript typing for `webpack-dev-server`
105
+ - Properly extended webpack Configuration with devServer types
106
+
107
+ ---
108
+
109
+ ## [1.0.3] - 2026-02-04
110
+
111
+ ### Fixed
112
+ - Fixed webpack default entry fallback (`./src`)
113
+ - Prevented webpack from resolving non-existing JS entry when using pug-plugin
114
+ - Stabilized template entry handling via `templatesLoader`
115
+
116
+ ### Internal
117
+ - Clarified responsibility between webpack entry and pug-plugin entry
118
+
119
+ ---
120
+
121
+ ## [1.0.2] - 2026-02-04
122
+
123
+ ### Fixed
124
+ - Fixed ENV mode option typing
125
+ - Stabilized base configuration behavior
126
+
127
+ ## [Unreleased]
128
+ ### Changed
129
+ - Updated README.md
package/README.md CHANGED
@@ -1,30 +1,62 @@
1
1
  # @razerspine/webpack-core
2
2
 
3
- Core webpack configuration and loaders for modern **Pug-based** projects.
3
+ Core webpack configuration and loaders for **Pug-based** projects.
4
4
 
5
- This package provides a stable, production-safe webpack foundation designed
6
- to work seamlessly with `pug-plugin` and template-driven builds.
5
+ This package provides a stable, production-safe webpack foundation for
6
+ template-driven builds using `pug-plugin`.
7
7
 
8
8
  ---
9
9
 
10
+ ## ⚠️ Important
11
+
12
+ Versions prior to 1.1.6 were part of a stabilization phase and are not recommended for production use.
13
+
14
+ Please use:
15
+ ```bash
16
+ npm install @razerspine/webpack-core@^1.1.6
17
+ ```
18
+
10
19
  ## Designed for
11
20
 
12
21
  This package is developed as part of the
13
22
  [Webpack Starter Monorepo](https://github.com/Razerspine/webpack-starter-monorepo).
14
23
 
15
24
  It contains shared webpack configuration and loaders used by the starter
16
- templates, but **can also be used independently** in custom setups.
25
+ templates, but can also be used independently.
26
+
27
+ ---
28
+
29
+ ## Design principles
30
+
31
+ - Webpack is responsible for:
32
+ - module resolution
33
+ - aliases (`resolve.alias`)
34
+ - asset handling
35
+
36
+ - Loaders and plugins:
37
+ - do not define aliases
38
+ - do not depend on UI kits
39
+ - do not assume project structure
40
+
41
+ - `pug-plugin` is used only to compile templates
42
+ Asset paths are resolved by webpack.
43
+
44
+ - Webpack JS entry is intentionally disabled
45
+ Builds are driven by template entries.
46
+
47
+ - No aggressive production optimizations by default
48
+ (e.g. no `splitChunks`)
17
49
 
18
50
  ---
19
51
 
20
52
  ## Features
21
53
 
22
- - Pug templates support (via `pug-plugin`)
23
- - JavaScript / TypeScript scripts
24
- - SCSS / Less styles
25
- - Environment-aware configuration
26
- - No hardcoded aliases or UI-kit dependencies
27
- - Production-safe defaults (no aggressive chunk splitting)
54
+ - Pug templates support
55
+ - JavaScript / TypeScript
56
+ - SCSS / Less
57
+ - Environment-aware configuration
58
+ - No hardcoded aliases
59
+ - Production-safe defaults
28
60
 
29
61
  ---
30
62
 
@@ -32,3 +64,47 @@ templates, but **can also be used independently** in custom setups.
32
64
 
33
65
  ```bash
34
66
  npm install @razerspine/webpack-core
67
+ ```
68
+
69
+ ---
70
+
71
+ ## Usage
72
+
73
+ ```js
74
+ const path = require('path');
75
+ const {
76
+ createBaseConfig,
77
+ createDevConfig,
78
+ createProdConfig,
79
+ } = require('@razerspine/webpack-core');
80
+
81
+ module.exports = (env = {}, argv = {}) => {
82
+ const mode = argv.mode || 'development';
83
+
84
+ const baseConfig = createBaseConfig({
85
+ mode,
86
+ scripts: 'js',
87
+ styles: 'less',
88
+ templates: {
89
+ entry: 'src/views/pages',
90
+ },
91
+ resolve: {
92
+ alias: {
93
+ '@views': path.resolve(process.cwd(), 'src/views'),
94
+ '@styles': path.resolve(process.cwd(), 'src/assets/styles'),
95
+ '@scripts': path.resolve(process.cwd(), 'src/assets/scripts'),
96
+ '@images': path.resolve(process.cwd(), 'src/assets/images'),
97
+ },
98
+ },
99
+ });
100
+
101
+ return mode === 'development'
102
+ ? createDevConfig(baseConfig)
103
+ : createProdConfig(baseConfig);
104
+ };
105
+ ```
106
+
107
+ ---
108
+
109
+ ## 📄 License
110
+ This project is licensed under the ISC License.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@razerspine/webpack-core",
3
- "version": "1.1.6",
3
+ "version": "1.1.7",
4
4
  "description": "Core webpack config and loaders for starter templates",
5
5
  "keywords": [
6
6
  "webpack",
@@ -8,7 +8,6 @@
8
8
  "pug",
9
9
  "pug-plugin"
10
10
  ],
11
-
12
11
  "license": "ISC",
13
12
  "author": "Razerspine",
14
13
  "type": "commonjs",
@@ -16,7 +15,8 @@
16
15
  "types": "dist/index.d.ts",
17
16
  "files": [
18
17
  "dist",
19
- "README.md"
18
+ "README.md",
19
+ "CHANGELOG.md"
20
20
  ],
21
21
  "scripts": {
22
22
  "build": "tsc -p tsconfig.json",