@workleap/webpack-configs 1.1.1 → 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 CHANGED
@@ -1,5 +1,11 @@
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
+
3
9
  ## 1.1.1
4
10
 
5
11
  ### Patch Changes
package/dist/build.d.ts CHANGED
@@ -4,8 +4,8 @@ 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;
@@ -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",
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-2MCAXFWL.js';
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
1
  export { defineBuildConfig, defineBuildHtmlWebpackPluginConfig, defineMiniCssExtractPluginConfig } from './chunk-IDO2HXCS.js';
2
- export { defineDevConfig, defineDevHtmlWebpackPluginConfig, defineFastRefreshPluginConfig } from './chunk-2MCAXFWL.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';
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@workleap/webpack-configs",
3
3
  "author": "Workleap",
4
4
  "description": "Workleap recommended webpack config.",
5
- "version": "1.1.1",
5
+ "version": "1.2.0",
6
6
  "license": "Apache-2.0",
7
7
  "keywords": [
8
8
  "workleap",