@workleap/webpack-configs 1.1.1 → 1.2.1
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 +12 -0
- package/dist/build.d.ts +1 -1
- package/dist/build.js +1 -1
- package/dist/{chunk-IDO2HXCS.js → chunk-VYQT72ZC.js} +5 -5
- package/dist/{chunk-2MCAXFWL.js → chunk-WDH5HE3E.js} +7 -6
- 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,17 @@
|
|
|
1
1
|
# @workleap/webpack-configs
|
|
2
2
|
|
|
3
|
+
## 1.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#167](https://github.com/gsoft-inc/wl-web-configs/pull/167) [`55e0bd4`](https://github.com/gsoft-inc/wl-web-configs/commit/55e0bd4a7574f3cc6c138474eca90b84a62ad16f) Thanks [@tjosepo](https://github.com/tjosepo)! - Fix file extension RegEx rules being too lenient
|
|
8
|
+
|
|
9
|
+
## 1.2.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#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.
|
|
14
|
+
|
|
3
15
|
## 1.1.1
|
|
4
16
|
|
|
5
17
|
### 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;
|
package/dist/build.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { defineBuildConfig, defineBuildHtmlWebpackPluginConfig, defineMiniCssExtractPluginConfig } from './chunk-
|
|
1
|
+
export { defineBuildConfig, defineBuildHtmlWebpackPluginConfig, defineMiniCssExtractPluginConfig } from './chunk-VYQT72ZC.js';
|
|
2
2
|
import './chunk-2YARCRX5.js';
|
|
3
3
|
import './chunk-QJI26K46.js';
|
|
@@ -121,21 +121,21 @@ function defineBuildConfig(swcConfig, options = {}) {
|
|
|
121
121
|
module: {
|
|
122
122
|
rules: [
|
|
123
123
|
{
|
|
124
|
-
test: /\.(js|jsx|ts|tsx)
|
|
124
|
+
test: /\.(js|jsx|ts|tsx)$/i,
|
|
125
125
|
exclude: /node_modules/,
|
|
126
126
|
loader: require2.resolve("swc-loader"),
|
|
127
127
|
options: swcConfig
|
|
128
128
|
},
|
|
129
129
|
{
|
|
130
130
|
// https://stackoverflow.com/questions/69427025/programmatic-webpack-jest-esm-cant-resolve-module-without-js-file-exten
|
|
131
|
-
test: /\.js
|
|
131
|
+
test: /\.js$/i,
|
|
132
132
|
include: /node_modules/,
|
|
133
133
|
resolve: {
|
|
134
134
|
fullySpecified: false
|
|
135
135
|
}
|
|
136
136
|
},
|
|
137
137
|
{
|
|
138
|
-
test: /\.css
|
|
138
|
+
test: /\.css$/i,
|
|
139
139
|
use: [
|
|
140
140
|
{ loader: MiniCssExtractPlugin.loader },
|
|
141
141
|
{
|
|
@@ -150,11 +150,11 @@ function defineBuildConfig(swcConfig, options = {}) {
|
|
|
150
150
|
]
|
|
151
151
|
},
|
|
152
152
|
{
|
|
153
|
-
test: /\.svg
|
|
153
|
+
test: /\.svg$/i,
|
|
154
154
|
loader: require2.resolve("@svgr/webpack")
|
|
155
155
|
},
|
|
156
156
|
{
|
|
157
|
-
test: /\.(png|jpe?g|gif)
|
|
157
|
+
test: /\.(png|jpe?g|gif)$/i,
|
|
158
158
|
type: "asset/resource"
|
|
159
159
|
},
|
|
160
160
|
...moduleRules
|
|
@@ -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",
|
|
@@ -131,21 +132,21 @@ function defineDevConfig(swcConfig, options = {}) {
|
|
|
131
132
|
module: {
|
|
132
133
|
rules: [
|
|
133
134
|
{
|
|
134
|
-
test: /\.(js|jsx|ts|tsx)
|
|
135
|
+
test: /\.(js|jsx|ts|tsx)$/i,
|
|
135
136
|
exclude: /node_modules/,
|
|
136
137
|
loader: require2.resolve("swc-loader"),
|
|
137
138
|
options: trySetSwcFastRefresh(swcConfig, fastRefresh !== false)
|
|
138
139
|
},
|
|
139
140
|
{
|
|
140
141
|
// https://stackoverflow.com/questions/69427025/programmatic-webpack-jest-esm-cant-resolve-module-without-js-file-exten
|
|
141
|
-
test: /\.js
|
|
142
|
+
test: /\.js$/i,
|
|
142
143
|
include: /node_modules/,
|
|
143
144
|
resolve: {
|
|
144
145
|
fullySpecified: false
|
|
145
146
|
}
|
|
146
147
|
},
|
|
147
148
|
{
|
|
148
|
-
test: /\.css
|
|
149
|
+
test: /\.css$/i,
|
|
149
150
|
use: [
|
|
150
151
|
{ loader: require2.resolve("style-loader") },
|
|
151
152
|
{
|
|
@@ -160,11 +161,11 @@ function defineDevConfig(swcConfig, options = {}) {
|
|
|
160
161
|
]
|
|
161
162
|
},
|
|
162
163
|
{
|
|
163
|
-
test: /\.svg
|
|
164
|
+
test: /\.svg$/i,
|
|
164
165
|
loader: require2.resolve("@svgr/webpack")
|
|
165
166
|
},
|
|
166
167
|
{
|
|
167
|
-
test: /\.(png|jpe?g|gif)
|
|
168
|
+
test: /\.(png|jpe?g|gif)$/i,
|
|
168
169
|
type: "asset/resource"
|
|
169
170
|
},
|
|
170
171
|
...moduleRules
|
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-WDH5HE3E.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-VYQT72ZC.js';
|
|
2
|
+
export { defineDevConfig, defineDevHtmlWebpackPluginConfig, defineFastRefreshPluginConfig } from './chunk-WDH5HE3E.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';
|