@nitro-web/webpack 0.0.24 → 0.0.26
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 +1 -2
- package/webpack.config.js +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nitro-web/webpack",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.26",
|
|
4
4
|
"repository": "github:boycce/nitro-web",
|
|
5
5
|
"homepage": "https://boycce.github.io/nitro-web/",
|
|
6
6
|
"main": "./webpack.config.js",
|
|
@@ -56,7 +56,6 @@
|
|
|
56
56
|
"react-router-dom": "6.24.1",
|
|
57
57
|
"react-select": "^5.9.0",
|
|
58
58
|
"react-tracked": "^1.3.0",
|
|
59
|
-
"sort-route-addresses-nodeps": "0.0.4",
|
|
60
59
|
"string-replace-loader": "^3.1.0",
|
|
61
60
|
"tailwind-merge": "^2.6.0",
|
|
62
61
|
"typescript": "^5.5.2",
|
package/webpack.config.js
CHANGED
|
@@ -21,6 +21,7 @@ import { getDirectories } from 'nitro-web/util'
|
|
|
21
21
|
const _require = createRequire(import.meta.url)
|
|
22
22
|
const pick = (object, list) => list.reduce((o, e) => ((o[e] = object[e]), o), {})
|
|
23
23
|
const isBuild = process.env.NODE_ENV == 'production'
|
|
24
|
+
const nitroVersion = _require('./package.json').version
|
|
24
25
|
|
|
25
26
|
// axiosRetry(axios, {
|
|
26
27
|
// retries: 10,
|
|
@@ -274,8 +275,9 @@ export const getConfig = (config) => {
|
|
|
274
275
|
}),
|
|
275
276
|
new webpack.DefinePlugin({
|
|
276
277
|
ISDEMO: !!process.env.isDemo,
|
|
277
|
-
|
|
278
|
+
INJECTED_CONFIG: JSON.stringify({
|
|
278
279
|
...pick(config, config.inject ? config.inject.split(' ') : []),
|
|
280
|
+
version: process.env.isDemo ? nitroVersion : config.version,
|
|
279
281
|
}),
|
|
280
282
|
}),
|
|
281
283
|
new ESLintPlugin({
|