@razerspine/webpack-core 1.1.5 → 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 +77 -27
  3. package/package.json +10 -2
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,60 +1,110 @@
1
1
  # @razerspine/webpack-core
2
2
 
3
+ Core webpack configuration and loaders for **Pug-based** projects.
3
4
 
4
- Core webpack configuration and loaders for modern Pug-based projects.
5
+ This package provides a stable, production-safe webpack foundation for
6
+ template-driven builds using `pug-plugin`.
7
+
8
+ ---
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
+ ```
5
18
 
6
19
  ## Designed for
7
20
 
8
- This package is developed as part of the
21
+ This package is developed as part of the
9
22
  [Webpack Starter Monorepo](https://github.com/Razerspine/webpack-starter-monorepo).
10
23
 
11
- It provides shared webpack configuration and loaders used by the
12
- starter templates, but can also be used independently in custom setups.
24
+ It contains shared webpack configuration and loaders used by the starter
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`)
49
+
50
+ ---
13
51
 
14
52
  ## Features
15
53
 
16
54
  - Pug templates support
17
- - JS / TS scripts
18
- - SCSS / Less styles
19
- - Environment-aware loaders
20
- - No aliases or UI-kit hardcoded
55
+ - JavaScript / TypeScript
56
+ - SCSS / Less
57
+ - Environment-aware configuration
58
+ - No hardcoded aliases
59
+ - Production-safe defaults
60
+
61
+ ---
21
62
 
22
63
  ## Installation
64
+
23
65
  ```bash
24
- npm i @razerspine/webpack-core
66
+ npm install @razerspine/webpack-core
25
67
  ```
26
68
 
69
+ ---
70
+
27
71
  ## Usage
28
72
 
29
73
  ```js
74
+ const path = require('path');
30
75
  const {
31
76
  createBaseConfig,
32
77
  createDevConfig,
33
- createProdConfig
78
+ createProdConfig,
34
79
  } = require('@razerspine/webpack-core');
35
80
 
36
- module.exports = (env, argv) => {
81
+ module.exports = (env = {}, argv = {}) => {
37
82
  const mode = argv.mode || 'development';
38
83
 
39
- return {
40
- ...createBaseConfig({
41
- root: process.cwd(),
42
- env: {
43
- mode,
44
- script: 'js',
45
- style: 'scss'
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'),
46
97
  },
47
- templates: {
48
- entry: 'src/views/pages'
49
- }
50
- }),
51
-
52
- ...(mode === 'development'
53
- ? createDevConfig()
54
- : createProdConfig())
55
- };
98
+ },
99
+ });
100
+
101
+ return mode === 'development'
102
+ ? createDevConfig(baseConfig)
103
+ : createProdConfig(baseConfig);
56
104
  };
57
105
  ```
58
106
 
107
+ ---
108
+
59
109
  ## 📄 License
60
110
  This project is licensed under the ISC License.
package/package.json CHANGED
@@ -1,14 +1,22 @@
1
1
  {
2
2
  "name": "@razerspine/webpack-core",
3
- "version": "1.1.5",
3
+ "version": "1.1.7",
4
4
  "description": "Core webpack config and loaders for starter templates",
5
+ "keywords": [
6
+ "webpack",
7
+ "webpack-config",
8
+ "pug",
9
+ "pug-plugin"
10
+ ],
5
11
  "license": "ISC",
6
12
  "author": "Razerspine",
7
13
  "type": "commonjs",
8
14
  "main": "dist/index.js",
9
15
  "types": "dist/index.d.ts",
10
16
  "files": [
11
- "dist"
17
+ "dist",
18
+ "README.md",
19
+ "CHANGELOG.md"
12
20
  ],
13
21
  "scripts": {
14
22
  "build": "tsc -p tsconfig.json",