@razerspine/webpack-core 1.0.3 → 1.0.5
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/dist/config/base.d.ts +3 -3
- package/dist/config/base.js +3 -3
- package/dist/config/dev.d.ts +6 -3
- package/dist/config/dev.js +16 -3
- package/dist/config/prod.d.ts +2 -9
- package/dist/config/prod.js +9 -4
- package/package.json +3 -3
package/dist/config/base.d.ts
CHANGED
|
@@ -4,10 +4,10 @@ export declare function createBaseConfig(options: ConfigOptionType): {
|
|
|
4
4
|
mode: ModeType;
|
|
5
5
|
/**
|
|
6
6
|
* IMPORTANT:
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* Disable default webpack entry (./src)
|
|
8
|
+
* because entry is fully controlled by pug-plugin
|
|
9
9
|
*/
|
|
10
|
-
entry: {};
|
|
10
|
+
entry: () => {};
|
|
11
11
|
output: {
|
|
12
12
|
clean: boolean;
|
|
13
13
|
};
|
package/dist/config/base.js
CHANGED
|
@@ -12,10 +12,10 @@ function createBaseConfig(options) {
|
|
|
12
12
|
mode,
|
|
13
13
|
/**
|
|
14
14
|
* IMPORTANT:
|
|
15
|
-
*
|
|
16
|
-
*
|
|
15
|
+
* Disable default webpack entry (./src)
|
|
16
|
+
* because entry is fully controlled by pug-plugin
|
|
17
17
|
*/
|
|
18
|
-
entry: {},
|
|
18
|
+
entry: () => ({}),
|
|
19
19
|
output: {
|
|
20
20
|
clean: true,
|
|
21
21
|
},
|
package/dist/config/dev.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import type { Configuration as WebpackConfiguration } from 'webpack';
|
|
2
|
+
import type { Configuration as DevServerConfiguration } from 'webpack-dev-server';
|
|
3
|
+
type DevConfig = WebpackConfiguration & {
|
|
4
|
+
devServer?: DevServerConfiguration;
|
|
4
5
|
};
|
|
6
|
+
export declare function createDevConfig(baseConfig: WebpackConfiguration): DevConfig;
|
|
7
|
+
export {};
|
package/dist/config/dev.js
CHANGED
|
@@ -1,9 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createDevConfig = createDevConfig;
|
|
4
|
-
function createDevConfig() {
|
|
4
|
+
function createDevConfig(baseConfig) {
|
|
5
5
|
return {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
...baseConfig,
|
|
7
|
+
/**
|
|
8
|
+
* Prevent webpack-dev-server from injecting ./src entry
|
|
9
|
+
*/
|
|
10
|
+
entry: () => ({}),
|
|
11
|
+
devtool: 'eval-source-map',
|
|
12
|
+
devServer: {
|
|
13
|
+
static: {
|
|
14
|
+
directory: 'public',
|
|
15
|
+
},
|
|
16
|
+
hot: true,
|
|
17
|
+
open: true,
|
|
18
|
+
compress: true,
|
|
19
|
+
port: 8080,
|
|
20
|
+
},
|
|
8
21
|
};
|
|
9
22
|
}
|
package/dist/config/prod.d.ts
CHANGED
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
optimization: {
|
|
4
|
-
minimize: boolean;
|
|
5
|
-
splitChunks: {
|
|
6
|
-
chunks: string;
|
|
7
|
-
};
|
|
8
|
-
};
|
|
9
|
-
};
|
|
1
|
+
import type { Configuration } from 'webpack';
|
|
2
|
+
export declare function createProdConfig(baseConfig: Configuration): Configuration;
|
package/dist/config/prod.js
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createProdConfig = createProdConfig;
|
|
4
|
-
function createProdConfig() {
|
|
4
|
+
function createProdConfig(baseConfig) {
|
|
5
5
|
return {
|
|
6
|
+
...baseConfig,
|
|
7
|
+
/**
|
|
8
|
+
* Prevent webpack from injecting ./src in production
|
|
9
|
+
*/
|
|
10
|
+
entry: () => ({}),
|
|
6
11
|
devtool: false,
|
|
7
12
|
optimization: {
|
|
8
13
|
minimize: true,
|
|
9
14
|
splitChunks: {
|
|
10
|
-
chunks: 'all'
|
|
11
|
-
}
|
|
12
|
-
}
|
|
15
|
+
chunks: 'all',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
13
18
|
};
|
|
14
19
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@razerspine/webpack-core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "Core webpack config and loaders for starter templates",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "Razerspine",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"pug-plugin": "^5.0.3"
|
|
22
22
|
},
|
|
23
|
-
|
|
24
23
|
"devDependencies": {
|
|
25
24
|
"@types/node": "^20.11.0",
|
|
26
|
-
"typescript": "^5.3.3"
|
|
25
|
+
"typescript": "^5.3.3",
|
|
26
|
+
"webpack-dev-server": "^5.2.3"
|
|
27
27
|
}
|
|
28
28
|
}
|