@caweb/webpack 1.1.2 → 1.1.4
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/package.json +2 -2
- package/webpack.config.js +2 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@caweb/webpack",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"description": "CAWebPublishing Webpack Configuration",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@caweb/a11y-webpack-plugin": "^1.0.4",
|
|
48
48
|
"@caweb/css-audit-webpack-plugin": "^1.0.4",
|
|
49
|
-
"@caweb/html-webpack-plugin": "^1.1.
|
|
49
|
+
"@caweb/html-webpack-plugin": "^1.1.2",
|
|
50
50
|
"@caweb/jshint-webpack-plugin": "^1.0.5",
|
|
51
51
|
"@wordpress/scripts": "^28.4.0",
|
|
52
52
|
"handlebars-loader": "^1.7.3",
|
package/webpack.config.js
CHANGED
|
@@ -122,7 +122,7 @@ if( 'serve' === webpackCommand ){
|
|
|
122
122
|
|
|
123
123
|
let template;
|
|
124
124
|
|
|
125
|
-
// Allow for template to be selected via
|
|
125
|
+
// Allow for template to be selected via NODE_OPTIONS env variable
|
|
126
126
|
if( process.env.NODE_OPTIONS ){
|
|
127
127
|
let opts = process.env.NODE_OPTIONS.split(' ').filter(e=>e).map(o=>o.replaceAll("'", ''))
|
|
128
128
|
if( opts.includes('--template') ){
|
|
@@ -130,15 +130,8 @@ if( 'serve' === webpackCommand ){
|
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
// Arguments passed to the process supersede env vars
|
|
134
|
-
if( process.argv.includes('--template') ){
|
|
135
|
-
template = process.argv[process.argv.indexOf('--template') + 1];
|
|
136
|
-
}
|
|
137
|
-
|
|
138
133
|
template = templates.includes(template) ? template : 'default';
|
|
139
|
-
|
|
140
|
-
console.log( template );
|
|
141
|
-
|
|
134
|
+
|
|
142
135
|
// Dev Server is added
|
|
143
136
|
webpackConfig.devServer = {
|
|
144
137
|
...baseConfig.devServer,
|