@oroinc/oro-webpack-config-builder 6.0.0-lts07 → 6.0.0-lts09
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/oro-webpack-config.js
CHANGED
|
@@ -9,8 +9,6 @@ const EntryPointFileWriter = require('./writer/scss-entry-point-file-writer');
|
|
|
9
9
|
const LayoutModulesConfigLoader = require('./modules-config/layout-modules-config-loader');
|
|
10
10
|
const LayoutStyleLoader = require('./style/layout-style-loader');
|
|
11
11
|
const MapModulesPlugin = require('./plugin/map/map-modules-plugin');
|
|
12
|
-
const IntegrityFilePlugin = require('./plugin/integrity/integrity-file-plugin');
|
|
13
|
-
const {SubresourceIntegrityPlugin} = require('webpack-subresource-integrity');
|
|
14
12
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
15
13
|
const ModulesConfigLoader = require('./modules-config/modules-config-loader');
|
|
16
14
|
const DynamicImportsFileWriter = require('./writer/dynamic-imports-file-writer');
|
|
@@ -285,8 +283,7 @@ class ConfigBuilder {
|
|
|
285
283
|
output: {
|
|
286
284
|
filename: '[name].js',
|
|
287
285
|
// Because we use third party libraries 'chunkFilename' should include only [name]
|
|
288
|
-
chunkFilename: this._getVersionedPath('chunk/[name].js', this.assetVersion)
|
|
289
|
-
crossOriginLoading: "anonymous"
|
|
286
|
+
chunkFilename: this._getVersionedPath('chunk/[name].js', this.assetVersion)
|
|
290
287
|
},
|
|
291
288
|
devtool: !env.skipSourcemap && 'inline-cheap-module-source-map',
|
|
292
289
|
mode: 'development',
|
|
@@ -355,10 +352,6 @@ class ConfigBuilder {
|
|
|
355
352
|
new webpack.optimize.MinChunkSizePlugin({
|
|
356
353
|
minChunkSize: 30000 // Minimum number of characters
|
|
357
354
|
}),
|
|
358
|
-
new SubresourceIntegrityPlugin(),
|
|
359
|
-
new IntegrityFilePlugin({
|
|
360
|
-
publicPath: this.resolvedPublicPath
|
|
361
|
-
}),
|
|
362
355
|
new AfterWebpackLogsPlugin(
|
|
363
356
|
stats => this.emitter.emit('build:complete', stats)
|
|
364
357
|
)
|
|
@@ -562,10 +555,11 @@ class ConfigBuilder {
|
|
|
562
555
|
options: {
|
|
563
556
|
implementation: require('sass'),
|
|
564
557
|
sassOptions: {
|
|
565
|
-
|
|
566
|
-
path.join(this.resolvedPublicPath, '/bundles')
|
|
558
|
+
loadPaths: [
|
|
559
|
+
path.join(this.resolvedPublicPath, '/bundles'),
|
|
560
|
+
path.join(this.resolvedProjectPath, '/assets')
|
|
567
561
|
],
|
|
568
|
-
|
|
562
|
+
style: 'expanded'
|
|
569
563
|
},
|
|
570
564
|
sourceMap: true,
|
|
571
565
|
additionalData: this.prepareAdditionalSCSS.bind(this, themeDefinition)
|
package/package.json
CHANGED
|
@@ -1,55 +1,54 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oroinc/oro-webpack-config-builder",
|
|
3
|
-
"version": "6.0.0-
|
|
3
|
+
"version": "6.0.0-lts09",
|
|
4
4
|
"author": "Oro, Inc. (https://oroinc.com)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "An integration of OroPlatform based applications with the Webpack.",
|
|
7
7
|
"main": "oro-webpack-config.js",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@swc/core": "^1.11
|
|
10
|
-
"@babel/core": "~7.
|
|
11
|
-
"@babel/plugin-transform-runtime": "~7.
|
|
12
|
-
"@babel/preset-env": "~7.
|
|
13
|
-
"autoprefixer": "~10.4.
|
|
14
|
-
"babel-loader": "~
|
|
9
|
+
"@swc/core": "^1.15.11",
|
|
10
|
+
"@babel/core": "~7.29.0",
|
|
11
|
+
"@babel/plugin-transform-runtime": "~7.29.0",
|
|
12
|
+
"@babel/preset-env": "~7.29.0",
|
|
13
|
+
"autoprefixer": "~10.4.24",
|
|
14
|
+
"babel-loader": "~10.0.0",
|
|
15
15
|
"bindings": "~1.5.0",
|
|
16
|
-
"css-loader": "^
|
|
17
|
-
"css-minimizer-webpack-plugin": "~
|
|
16
|
+
"css-loader": "^7.1.3",
|
|
17
|
+
"css-minimizer-webpack-plugin": "~7.0.4",
|
|
18
18
|
"deepmerge": "~4.3.1",
|
|
19
|
-
"exports-loader": "~
|
|
20
|
-
"expose-loader": "~
|
|
21
|
-
"esbuild-loader": "^4.
|
|
19
|
+
"exports-loader": "~5.0.0",
|
|
20
|
+
"expose-loader": "~5.0.1",
|
|
21
|
+
"esbuild-loader": "^4.4.2",
|
|
22
22
|
"file-loader": "~6.2.0",
|
|
23
|
-
"html-webpack-plugin": "~5.
|
|
24
|
-
"imports-loader": "~
|
|
25
|
-
"js-yaml": "~4.1.
|
|
23
|
+
"html-webpack-plugin": "~5.6.6",
|
|
24
|
+
"imports-loader": "~5.0.0",
|
|
25
|
+
"js-yaml": "~4.1.1",
|
|
26
26
|
"lezer-loader": "^0.3.0",
|
|
27
|
-
"mini-css-extract-plugin": "~2.
|
|
28
|
-
"minimist": "~1.2.
|
|
29
|
-
"nan": "~2.
|
|
27
|
+
"mini-css-extract-plugin": "~2.10.0",
|
|
28
|
+
"minimist": "~1.2.8",
|
|
29
|
+
"nan": "~2.25.0",
|
|
30
30
|
"path": "0.12.7",
|
|
31
|
-
"postcss": "
|
|
32
|
-
"postcss-loader": "~
|
|
33
|
-
"printf": "~0.6.
|
|
31
|
+
"postcss": "~8.5.6",
|
|
32
|
+
"postcss-loader": "~8.2.0",
|
|
33
|
+
"printf": "~0.6.1",
|
|
34
34
|
"resolve-url-loader": "^5.0.0",
|
|
35
|
-
"rtlcss-webpack-plugin": "~4.0.
|
|
36
|
-
"sass": "
|
|
37
|
-
"sass-loader": "
|
|
38
|
-
"schema-utils": "^4.
|
|
39
|
-
"style-loader": "~
|
|
40
|
-
"svgo": "^
|
|
35
|
+
"rtlcss-webpack-plugin": "~4.0.7",
|
|
36
|
+
"sass": "1.98.0",
|
|
37
|
+
"sass-loader": "16.0.7",
|
|
38
|
+
"schema-utils": "^4.3.3",
|
|
39
|
+
"style-loader": "~4.0.0",
|
|
40
|
+
"svgo": "^4.0.0",
|
|
41
41
|
"svgstore": "^3.0.1",
|
|
42
|
-
"terser": "~5.
|
|
43
|
-
"terser-webpack-plugin": "^5.3.
|
|
42
|
+
"terser": "~5.46.0",
|
|
43
|
+
"terser-webpack-plugin": "^5.3.16",
|
|
44
44
|
"text-loader": "0.0.1",
|
|
45
45
|
"underscore": "1.13.*",
|
|
46
46
|
"url-loader": "~4.1.1",
|
|
47
|
-
"webpack": "~5.
|
|
48
|
-
"webpack-bundle-analyzer": "~
|
|
49
|
-
"webpack-cli": "~
|
|
50
|
-
"webpack-dev-server": "^
|
|
51
|
-
"webpack-merge": "~
|
|
52
|
-
"
|
|
53
|
-
"wildcard": "~2.0.0"
|
|
47
|
+
"webpack": "~5.105.0",
|
|
48
|
+
"webpack-bundle-analyzer": "~5.2.0",
|
|
49
|
+
"webpack-cli": "~6.0.1",
|
|
50
|
+
"webpack-dev-server": "^5.2.3",
|
|
51
|
+
"webpack-merge": "~6.0.1",
|
|
52
|
+
"wildcard": "~2.0.1"
|
|
54
53
|
}
|
|
55
54
|
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
const { createHash } = require('crypto');
|
|
2
|
-
const { Compilation, sources } = require('webpack');
|
|
3
|
-
const fs = require('fs').promises;
|
|
4
|
-
const path = require('path');
|
|
5
|
-
|
|
6
|
-
class IntegrityFilePlugin {
|
|
7
|
-
constructor({fileName = 'integrity.json', publicPath = '', algorithm = 'sha384'} = {}) {
|
|
8
|
-
this.fileName = fileName;
|
|
9
|
-
this.publicPath = publicPath;
|
|
10
|
-
this.algorithm = algorithm;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
apply(compiler) {
|
|
14
|
-
compiler.hooks.thisCompilation.tap('IntegrityFilePlugin', (compilation) => {
|
|
15
|
-
compilation.hooks.processAssets.tapPromise(
|
|
16
|
-
{ name: 'SubresourceIntegrityPlugin', stage: Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_TRANSFER },
|
|
17
|
-
async () => {
|
|
18
|
-
const integrityData = Object.fromEntries(
|
|
19
|
-
Object.entries(compilation.assets)
|
|
20
|
-
.filter(([assetName]) => assetName.endsWith('.css') || assetName.endsWith('.js'))
|
|
21
|
-
.map(([assetName, asset]) => {
|
|
22
|
-
const hash = createHash(this.algorithm).update(asset.source()).digest('base64');
|
|
23
|
-
const assetNormalized = assetName.split('?')[0];
|
|
24
|
-
|
|
25
|
-
return [
|
|
26
|
-
path.join(compiler.options.output.publicPath || '', assetNormalized),
|
|
27
|
-
`${this.algorithm}-${hash}`
|
|
28
|
-
];
|
|
29
|
-
})
|
|
30
|
-
);
|
|
31
|
-
const jsonData = JSON.stringify(integrityData, null, 2);
|
|
32
|
-
const outputPath = path.join(this.publicPath, compiler.options.output.publicPath, this.fileName);
|
|
33
|
-
|
|
34
|
-
await fs.writeFile(outputPath, jsonData, 'utf8');
|
|
35
|
-
compilation.emitAsset(outputPath, new sources.RawSource(jsonData));
|
|
36
|
-
}
|
|
37
|
-
);
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
module.exports = IntegrityFilePlugin;
|