@workleap/webpack-configs 1.1.0 → 1.2.0
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/CHANGELOG.md +13 -0
- package/dist/build.d.ts +2 -2
- package/dist/build.js +1 -1
- package/dist/{chunk-2MCAXFWL.js → chunk-4SM5S5E3.js} +2 -1
- package/dist/{chunk-MVNLHMHU.js → chunk-IDO2HXCS.js} +6 -9
- package/dist/dev.d.ts +1 -0
- package/dist/dev.js +1 -1
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @workleap/webpack-configs
|
|
2
2
|
|
|
3
|
+
## 1.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#164](https://github.com/gsoft-inc/wl-web-configs/pull/164) [`b747f5b`](https://github.com/gsoft-inc/wl-web-configs/commit/b747f5b1d1bc7f0b7935e04ab971dad256e8ed8c) Thanks [@patricklafrance](https://github.com/patricklafrance)! - - Added a `publicPath` prop to the development configuration.
|
|
8
|
+
|
|
9
|
+
## 1.1.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#162](https://github.com/gsoft-inc/wl-web-configs/pull/162) [`fff9d08`](https://github.com/gsoft-inc/wl-web-configs/commit/fff9d087ebfe941fb38de8a46b3af79258f7f80d) Thanks [@patricklafrance](https://github.com/patricklafrance)! - - Removed the `build` config `preflight` function because it's not enforced by TypeScript typings.
|
|
14
|
+
- Updated the `build` config non-optimized options.
|
|
15
|
+
|
|
3
16
|
## 1.1.0
|
|
4
17
|
|
|
5
18
|
### Minor Changes
|
package/dist/build.d.ts
CHANGED
|
@@ -4,13 +4,13 @@ import MiniCssExtractPlugin from 'mini-css-extract-plugin';
|
|
|
4
4
|
import { Configuration } from 'webpack';
|
|
5
5
|
import { WebpackConfigTransformer } from './transformers/applyTransformers.js';
|
|
6
6
|
|
|
7
|
-
type MiniCssExtractPluginOptions = NonNullable<ConstructorParameters<typeof MiniCssExtractPlugin>[number]>;
|
|
8
7
|
declare function defineBuildHtmlWebpackPluginConfig(options?: HtmlWebpackPlugin.Options): HtmlWebpackPlugin.Options;
|
|
8
|
+
type MiniCssExtractPluginOptions = NonNullable<ConstructorParameters<typeof MiniCssExtractPlugin>[number]>;
|
|
9
9
|
declare function defineMiniCssExtractPluginConfig(options?: MiniCssExtractPluginOptions): MiniCssExtractPluginOptions;
|
|
10
10
|
interface DefineBuildConfigOptions {
|
|
11
11
|
entry?: string;
|
|
12
12
|
outputPath?: string;
|
|
13
|
-
publicPath?: string;
|
|
13
|
+
publicPath?: `${string}/` | "auto";
|
|
14
14
|
cache?: boolean;
|
|
15
15
|
cacheDirectory?: string;
|
|
16
16
|
moduleRules?: NonNullable<Configuration["module"]>["rules"];
|
package/dist/build.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { defineBuildConfig, defineBuildHtmlWebpackPluginConfig, defineMiniCssExtractPluginConfig } from './chunk-
|
|
1
|
+
export { defineBuildConfig, defineBuildHtmlWebpackPluginConfig, defineMiniCssExtractPluginConfig } from './chunk-IDO2HXCS.js';
|
|
2
2
|
import './chunk-2YARCRX5.js';
|
|
3
3
|
import './chunk-QJI26K46.js';
|
|
@@ -48,6 +48,7 @@ function defineDevConfig(swcConfig, options = {}) {
|
|
|
48
48
|
https = false,
|
|
49
49
|
host = "localhost",
|
|
50
50
|
port = 8080,
|
|
51
|
+
publicPath,
|
|
51
52
|
cache = true,
|
|
52
53
|
cacheDirectory = path.resolve("node_modules/.cache/webpack"),
|
|
53
54
|
moduleRules = [],
|
|
@@ -81,7 +82,7 @@ function defineDevConfig(swcConfig, options = {}) {
|
|
|
81
82
|
entry,
|
|
82
83
|
output: {
|
|
83
84
|
// The trailing / is very important, otherwise paths will not be resolved correctly.
|
|
84
|
-
publicPath: `${https ? "https" : "http"}://${host}:${port}/`
|
|
85
|
+
publicPath: publicPath ?? `${https ? "https" : "http"}://${host}:${port}/`
|
|
85
86
|
},
|
|
86
87
|
cache: cache && {
|
|
87
88
|
type: "filesystem",
|
|
@@ -31,15 +31,7 @@ function defineMiniCssExtractPluginConfig(options = {}) {
|
|
|
31
31
|
filename
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
-
function preflight(options) {
|
|
35
|
-
if (options.publicPath) {
|
|
36
|
-
if (!options.publicPath.endsWith("/")) {
|
|
37
|
-
throw new Error('[webpack-configs] The "publicPath" must end with a "/".');
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
34
|
function defineBuildConfig(swcConfig, options = {}) {
|
|
42
|
-
preflight(options);
|
|
43
35
|
const {
|
|
44
36
|
entry = path.resolve("./src/index.tsx"),
|
|
45
37
|
outputPath = path.resolve("dist"),
|
|
@@ -114,7 +106,12 @@ function defineBuildConfig(swcConfig, options = {}) {
|
|
|
114
106
|
} : {
|
|
115
107
|
minimize: false,
|
|
116
108
|
chunkIds: "named",
|
|
117
|
-
|
|
109
|
+
concatenateModules: false,
|
|
110
|
+
flagIncludedChunks: false,
|
|
111
|
+
mangleExports: false,
|
|
112
|
+
mangleWasmImports: false,
|
|
113
|
+
moduleIds: "named",
|
|
114
|
+
removeAvailableModules: false
|
|
118
115
|
},
|
|
119
116
|
infrastructureLogging: verbose ? {
|
|
120
117
|
appendOnly: true,
|
package/dist/dev.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ interface DefineDevConfigOptions {
|
|
|
11
11
|
https?: NonNullable<Configuration["devServer"]>["https"];
|
|
12
12
|
host?: string;
|
|
13
13
|
port?: number;
|
|
14
|
+
publicPath?: `${string}/` | "auto";
|
|
14
15
|
cache?: boolean;
|
|
15
16
|
cacheDirectory?: string;
|
|
16
17
|
moduleRules?: NonNullable<Configuration["module"]>["rules"];
|
package/dist/dev.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { defineDevConfig, defineDevHtmlWebpackPluginConfig, defineFastRefreshPluginConfig } from './chunk-
|
|
1
|
+
export { defineDevConfig, defineDevHtmlWebpackPluginConfig, defineFastRefreshPluginConfig } from './chunk-4SM5S5E3.js';
|
|
2
2
|
import './chunk-2YARCRX5.js';
|
|
3
3
|
import './chunk-QJI26K46.js';
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { defineBuildConfig, defineBuildHtmlWebpackPluginConfig, defineMiniCssExtractPluginConfig } from './chunk-
|
|
2
|
-
export { defineDevConfig, defineDevHtmlWebpackPluginConfig, defineFastRefreshPluginConfig } from './chunk-
|
|
1
|
+
export { defineBuildConfig, defineBuildHtmlWebpackPluginConfig, defineMiniCssExtractPluginConfig } from './chunk-IDO2HXCS.js';
|
|
2
|
+
export { defineDevConfig, defineDevHtmlWebpackPluginConfig, defineFastRefreshPluginConfig } from './chunk-4SM5S5E3.js';
|
|
3
3
|
import './chunk-2YARCRX5.js';
|
|
4
4
|
import './chunk-QJI26K46.js';
|
|
5
5
|
export { addAfterModuleRule, addBeforeModuleRule, findModuleRule, findModuleRules, matchAssetModuleType, matchLoaderName, matchTest, removeModuleRules, replaceModuleRule } from './chunk-34O5ZLZ6.js';
|