arui-scripts 20.2.1 → 20.4.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/.eslintrc.js +3 -3
- package/.prettierignore +2 -0
- package/.turbo/turbo-test.log +7 -7
- package/CHANGELOG.md +17 -0
- package/build/commands/build/client.js +2 -0
- package/build/commands/build/index.js +0 -2
- package/build/commands/build/server.js +2 -0
- package/build/commands/start/client.js +2 -0
- package/build/commands/start/index.js +0 -2
- package/build/commands/start/server.js +2 -0
- package/build/commands/start-prod/client.js +2 -0
- package/build/commands/start-prod/index.js +0 -2
- package/build/commands/start-prod/server.js +2 -0
- package/build/commands/util/client-assets-sizes.d.ts +1 -1
- package/build/commands/util/client-assets-sizes.js +8 -6
- package/build/commands/util/format-webpack-messages.d.ts +1 -1
- package/build/commands/util/format-webpack-messages.js +2 -1
- package/build/commands/util/load-browserslist.d.ts +1 -0
- package/build/commands/util/load-browserslist.js +15 -0
- package/build/commands/util/run-client-dev-server.d.ts +1 -1
- package/build/commands/util/run-server-watch-compiler.d.ts +1 -1
- package/build/configs/app-configs/calculate-dependent-config.d.ts +1 -1
- package/build/configs/app-configs/calculate-dependent-config.js +1 -2
- package/build/configs/app-configs/get-defaults.d.ts +1 -1
- package/build/configs/app-configs/index.d.ts +1 -1
- package/build/configs/app-configs/types.d.ts +2 -2
- package/build/configs/app-configs/update-with-config-file.d.ts +1 -1
- package/build/configs/app-configs/update-with-env.d.ts +1 -1
- package/build/configs/app-configs/update-with-package.d.ts +1 -1
- package/build/configs/app-configs/update-with-presets.d.ts +1 -1
- package/build/configs/app-configs/warn-about-deprecations.d.ts +1 -1
- package/build/configs/client-env-config/client-config-plugin.d.ts +1 -1
- package/build/configs/dev-server.d.ts +1 -1
- package/build/configs/modules.d.ts +1 -1
- package/build/configs/modules.js +1 -1
- package/build/configs/postcss.config.d.ts +1 -4
- package/build/configs/postcss.config.js +0 -4
- package/build/configs/process-assets-plugin-output.d.ts +1 -1
- package/build/configs/server-externals-exemptions.js +1 -0
- package/build/configs/stats-options.d.ts +1 -1
- package/build/configs/supporting-node.d.ts +1 -0
- package/build/configs/supporting-node.js +5 -0
- package/build/configs/swc.d.ts +1 -1
- package/build/configs/util/apply-overrides.d.ts +7 -6
- package/build/configs/util/compress-with-dcb.js +1 -5
- package/build/configs/util/compression-plugins-for-dictionaries.js +3 -6
- package/build/configs/util/dcb-compression-plugin.d.ts +3 -3
- package/build/configs/util/dcb-compression-plugin.js +12 -4
- package/build/configs/util/find-loader.d.ts +1 -1
- package/build/configs/util/find-plugin.d.ts +12 -12
- package/build/configs/util/get-polyfills.d.ts +1 -1
- package/build/configs/webpack.client.d.ts +2 -2
- package/build/configs/webpack.client.js +9 -12
- package/build/configs/webpack.server.d.ts +1 -1
- package/build/plugins/arui-runtime/index.d.ts +1 -1
- package/build/plugins/arui-runtime/index.js +1 -1
- package/build/plugins/postcss-global-variables/postcss-global-variables.d.ts +1 -1
- package/build/plugins/postcss-global-variables/utils/utils.d.ts +1 -1
- package/build/plugins/postcss-prefix-selector.d.ts +1 -1
- package/build/plugins/reload-server-plugin.d.ts +1 -1
- package/build/plugins/turn-off-split-remote-entry.d.ts +1 -1
- package/build/templates/nginx.conf.template.js +3 -1
- package/build/tsconfig-local.tsbuildinfo +1 -1
- package/docs/overrides.md +2 -0
- package/package.json +6 -10
- package/tsconfig-local.json +1 -4
- package/tsconfig.json +2 -5
- package/.browserslistrc +0 -5
|
@@ -40,7 +40,6 @@ const css_minimizer_webpack_plugin_1 = __importDefault(require("css-minimizer-we
|
|
|
40
40
|
const fork_ts_checker_webpack_plugin_1 = __importDefault(require("fork-ts-checker-webpack-plugin"));
|
|
41
41
|
const html_webpack_plugin_1 = __importDefault(require("html-webpack-plugin"));
|
|
42
42
|
const rspack_manifest_plugin_1 = require("rspack-manifest-plugin");
|
|
43
|
-
const terser_webpack_plugin_1 = __importDefault(require("terser-webpack-plugin"));
|
|
44
43
|
const webpack_deduplication_plugin_1 = require("webpack-deduplication-plugin");
|
|
45
44
|
const arui_runtime_1 = require("../plugins/arui-runtime");
|
|
46
45
|
const html_template_1 = require("../templates/html.template");
|
|
@@ -81,10 +80,7 @@ function getMinimizeConfig(mode) {
|
|
|
81
80
|
if (mode === 'prod') {
|
|
82
81
|
return {
|
|
83
82
|
minimize: true,
|
|
84
|
-
minimizer: [
|
|
85
|
-
new terser_webpack_plugin_1.default(),
|
|
86
|
-
new css_minimizer_webpack_plugin_1.default(),
|
|
87
|
-
].filter(Boolean),
|
|
83
|
+
minimizer: [new core_1.SwcJsMinimizerRspackPlugin(), new css_minimizer_webpack_plugin_1.default()].filter(Boolean),
|
|
88
84
|
};
|
|
89
85
|
}
|
|
90
86
|
if (app_configs_1.configs.keepCssVars) {
|
|
@@ -321,9 +317,10 @@ const createSingleClientWebpackConfig = (mode, entry, configName) => (Object.ass
|
|
|
321
317
|
filename: '../index.html',
|
|
322
318
|
}),
|
|
323
319
|
mode === 'dev' && app_configs_1.configs.clientOnly && new client_env_config_1.ClientConfigPlugin(),
|
|
324
|
-
app_configs_1.configs.compressionPredefinedDictionaryPath &&
|
|
325
|
-
|
|
326
|
-
|
|
320
|
+
app_configs_1.configs.compressionPredefinedDictionaryPath &&
|
|
321
|
+
new core_1.CopyRspackPlugin({
|
|
322
|
+
patterns: app_configs_1.configs.compressionPredefinedDictionaryPath,
|
|
323
|
+
}),
|
|
327
324
|
// production plugins:
|
|
328
325
|
mode === 'prod' && new rspack_manifest_plugin_1.RspackManifestPlugin({}),
|
|
329
326
|
mode === 'prod' &&
|
|
@@ -342,7 +339,7 @@ const createSingleClientWebpackConfig = (mode, entry, configName) => (Object.ass
|
|
|
342
339
|
test: /\.(js|css|html|svg|dict)$/,
|
|
343
340
|
compressionOptions: {
|
|
344
341
|
params: {
|
|
345
|
-
[zlib.constants.BROTLI_PARAM_QUALITY]: 11
|
|
342
|
+
[zlib.constants.BROTLI_PARAM_QUALITY]: 11,
|
|
346
343
|
},
|
|
347
344
|
},
|
|
348
345
|
threshold: 10240,
|
|
@@ -356,9 +353,9 @@ const createSingleClientWebpackConfig = (mode, entry, configName) => (Object.ass
|
|
|
356
353
|
mode === 'prod' &&
|
|
357
354
|
!app_configs_1.configs.keepPropTypes &&
|
|
358
355
|
new core_1.NormalModuleReplacementPlugin(/^thrift-services\/proptypes/, noopPath),
|
|
359
|
-
]
|
|
360
|
-
...(mode === 'prod' ? (0, compression_plugins_for_dictionaries_1.compressionPluginsForDictionaries)() : [])
|
|
361
|
-
|
|
356
|
+
]
|
|
357
|
+
.concat([...(mode === 'prod' ? (0, compression_plugins_for_dictionaries_1.compressionPluginsForDictionaries)() : [])])
|
|
358
|
+
.filter(Boolean),
|
|
362
359
|
// Без этого комиляция трирегилась на изменение в node_modules и приводила к утечке памяти
|
|
363
360
|
watchOptions: {
|
|
364
361
|
ignored: new RegExp(app_configs_1.configs.watchIgnorePath.join('|')),
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Configuration } from '@rspack/core';
|
|
1
|
+
import { type Configuration } from '@rspack/core';
|
|
2
2
|
export declare const createServerConfig: (mode: "dev" | "prod") => Configuration;
|
|
@@ -26,7 +26,7 @@ exports.AruiRuntimePlugin = AruiRuntimePlugin;
|
|
|
26
26
|
function getInsertCssRuntimeMethod() {
|
|
27
27
|
/* eslint-disable no-var,vars-on-top,prefer-destructuring */
|
|
28
28
|
return function insertCssRuntime(linkTag) {
|
|
29
|
-
if (__webpack_require__
|
|
29
|
+
if (__webpack_require__ === null || __webpack_require__ === void 0 ? void 0 : __webpack_require__.$ARUI.scriptSource) {
|
|
30
30
|
var scriptSource = __webpack_require__.$ARUI.scriptSource;
|
|
31
31
|
var targetElementSelector = scriptSource.getAttribute('data-resources-target-selector');
|
|
32
32
|
if (targetElementSelector) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AtRule, Helpers, Root, Rule } from 'postcss';
|
|
1
|
+
import { type AtRule, type Helpers, type Root, Rule } from 'postcss';
|
|
2
2
|
export declare const getMediaQueryName: (rule: AtRule) => string;
|
|
3
3
|
export declare function parseImport(root: Root, postcssHelpers: Helpers, filePath: string): Root;
|
|
4
4
|
export declare const parseVariables: (importedFile: Root, parsedVariables: Record<string, string>) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Compiler, RspackPluginInstance } from '@rspack/core';
|
|
1
|
+
import { type Compiler, type RspackPluginInstance } from '@rspack/core';
|
|
2
2
|
/**
|
|
3
3
|
* Force remote entry not be affected by user's chunkSplit strategy,
|
|
4
4
|
* Otherwise, the remote chunk will not be loaded correctly.
|
|
@@ -8,7 +8,9 @@ const nginxTemplate = `client_max_body_size 20m;
|
|
|
8
8
|
server {
|
|
9
9
|
listen ${app_configs_1.configs.clientServerPort};
|
|
10
10
|
server_tokens off;
|
|
11
|
-
${app_configs_1.configs.dictionaryCompression.enablePreviousVersionHeaders
|
|
11
|
+
${app_configs_1.configs.dictionaryCompression.enablePreviousVersionHeaders
|
|
12
|
+
? 'brotli_auto_dictionary on;'
|
|
13
|
+
: ''}
|
|
12
14
|
|
|
13
15
|
${app_configs_1.configs.clientOnly
|
|
14
16
|
? `location / {
|