Răsfoiți Sursa

Replace webpack with RSPack

- feat: add rspack.headless.js
- feat: add rspack.nodeps.js
- feat: Add rspack.serve.js
- feat: add rspack.build.js
- chore: Update TODO.md with completed Rspack config conversions
- fix: use npx to run rspack in devserver script
- chore: update dev dependencies for rspack migration
- feat: replace copy plugin with rspack built-in asset handling
- feat: use CopyRspackPlugin for asset copying
- chore: Update TODO.md to reflect CopyRspackPlugin usage
- build: update rspack dependencies to v1.3.15
- chore: add webpack-merge dependency and update imports
- fix: import merge from webpack-merge in rspack.serve.js
- chore: ignore node_modules in rspack watch options
- fix: correct RSPack alias configuration structure
- chore: remove webpack config and dependencies
- move `webpack` dir to `rspack`
JC Brand 1 lună în urmă
părinte
comite
1f4d2d45ab

+ 1 - 0
CHANGES.md

@@ -5,6 +5,7 @@
 - #3700: Fix exception that occurs when optional cp attribute is missing
 - Add approval banner in chats with requesting contacts or unsaved contacts
 - Some fixes regarding manually resized chats in `overlayed` view mode.
+- Replace webpack with [rspack](https://rspack.rs)
 
 ## 11.0.1 (2025-06-09)
 

+ 3 - 3
Makefile

@@ -156,7 +156,7 @@ devserver: node_modules
 ########################################################################
 ## Builds
 
-dist/converse-no-dependencies.js: src webpack/webpack.common.js webpack/webpack.nodeps.js @converse/headless node_modules
+dist/converse-no-dependencies.js: src rspack/rspack.common.js rspack/rspack.nodeps.js @converse/headless node_modules
 	npm run nodeps
 
 dist/converse.js:: node_modules
@@ -197,10 +197,10 @@ logo/conversejs-filled%.png:: logo/conversejs-filled.svg
 
 @converse/headless: src/headless
 
-src/headless/dist/converse-headless.js: src webpack/webpack.common.js node_modules @converse/headless
+src/headless/dist/converse-headless.js: src rspack/rspack.common.js node_modules @converse/headless
 	npm run headless-dev
 
-src/headless/dist/converse-headless.min.js: src webpack/webpack.common.js node_modules @converse/headless
+src/headless/dist/converse-headless.min.js: src rspack/rspack.common.js node_modules @converse/headless
 	npm run headless
 
 dist:: node_modules src/**/* | dist/website.css dist/website.min.css

+ 44 - 0
TODO.md

@@ -0,0 +1,44 @@
+# RSPack Migration Plan
+
+## Implementation Prompt
+"Migrate the Converse.js build system from Webpack to RSPack by:
+1. Replacing all Webpack configuration files with RSPack equivalents
+2. Using RSPack's built-in plugins instead of Webpack plugins where possible
+3. Removing unnecessary loaders since RSPack has SWC built-in
+4. Maintaining all existing functionality while improving build performance
+5. Keeping the existing file structure and build process intact"
+
+## Migration Checklist
+
+### Configuration Files
+- [x] Create `rspack.common.js` base configuration
+- [x] Convert `webpack.build.js` to `rspack.build.js`
+- [x] Convert `webpack.headless.js` to `rspack.headless.js` 
+- [x] Convert `webpack.nodeps.js` to `rspack.nodeps.js`
+- [x] Convert `webpack.serve.js` to `rspack.serve.js`
+
+### Plugin Replacements
+- [x] Replace `CircularDependencyPlugin` with `CircularDependencyRspackPlugin`
+- [x] Replace `CopyWebpackPlugin` with `CopyRspackPlugin`
+- [ ] Replace `MiniCssExtractPlugin` with `CssExtractRspackPlugin`
+- [ ] Replace `DefinePlugin` with RSPack's version
+- [ ] Remove `TerserPlugin` (handled by RSPack internally)
+
+### Loader Optimizations
+- [ ] Remove `swc-loader` (use RSPack's built-in SWC)
+- [ ] Update SCSS/CSS loaders to work with RSPack
+- [ ] Keep `po-loader` as is (still needed)
+- [ ] Update asset handling for fonts/images
+
+### Package.json Updates
+- [x] Add RSPack dependencies
+- [x] Update build scripts
+- [x] Remove unused Webpack dependencies
+- [x] Verify all other dependencies still work
+
+### Testing
+- [ ] Test production build
+- [ ] Test headless build  
+- [ ] Test development server
+- [ ] Verify all assets are included correctly
+- [ ] Check for circular dependency warnings

Fișier diff suprimat deoarece este prea mare
+ 309 - 300
package-lock.json


+ 10 - 18
package.json

@@ -45,21 +45,21 @@
     "3rdparty/*.js"
   ],
   "scripts": {
-    "build": "npm run build:website-min-css && webpack --config webpack/webpack.build.js",
+    "build": "npm run build:website-min-css && rspack build --config rspack/rspack.build.js",
     "build:website-css": "sass --quiet --load-path=node_modules src/shared/styles/website.scss dist/website.css",
     "build:website-min-css": "npm run build:website-css && npx clean-css-cli dist/website.css > dist/website.min.css",
     "lint": "eslint src/**/*.js",
     "test": "karma start karma.conf",
     "cdn": "ASSET_PATH=https://cdn.conversejs.org/dist/ npm run build",
     "clean": "rm -rf node_modules dist *.zip src/headless/dist src/headless/node_modules",
-    "dev": "webpack --config webpack/webpack.build.js --mode=development",
-    "headless": "webpack --config webpack/webpack.headless.js",
-    "headless-dev": "webpack --config webpack/webpack.headless.js --mode=development",
-    "nodeps": "webpack --config webpack/webpack.nodeps.js",
+    "dev": "rspack build --config rspack/rspack.build.js --mode=development",
+    "headless": "rspack build --config rspack/rspack.headless.js",
+    "headless-dev": "rspack build --config rspack/rspack.headless.js --mode=development",
+    "nodeps": "rspack build --config rspack/rspack.nodeps.js",
     "serve": "http-server -c-1",
     "serve-tls": "http-server -S -C certs/chat.example.org.crt -K certs/chat.example.org.key",
-    "devserver": "webpack serve --config webpack/webpack.serve.js",
-    "watch": "webpack --watch --config webpack/webpack.build.js --mode=development",
+    "devserver": "npx rspack serve --config rspack/rspack.serve.js",
+    "watch": "rspack build --watch --config rspack/rspack.build.js --mode=development",
     "types": "tsc -p ./src/log/tsconfig.json && tsc -p ./src/headless/tsconfig.json && tsc",
     "check:types": "tsc --noEmit"
   },
@@ -91,7 +91,8 @@
     "@converse/headless": "file:src/headless",
     "@eslint/eslintrc": "^3.3.1",
     "@eslint/js": "^9.24.0",
-    "@swc/core": "^1.11.29",
+    "@rspack/cli": "^1.3.15",
+    "@rspack/core": "^1.3.15",
     "@types/bootstrap": "^5.2.10",
     "@types/lodash-es": "^4.17.12",
     "@types/sizzle": "^2.3.8",
@@ -99,9 +100,7 @@
     "@typescript-eslint/eslint-plugin": "^8.29.0",
     "@typescript-eslint/parser": "^8.29.0",
     "autoprefixer": "^10.4.5",
-    "circular-dependency-plugin": "^5.2.2",
     "clean-css-cli": "^5.6.2",
-    "copy-webpack-plugin": "^12.0.2",
     "css-loader": "^7.1.2",
     "eslint": "^9.24.0",
     "fast-text-encoding": "^1.0.3",
@@ -114,8 +113,6 @@
     "karma-cli": "^2.0.0",
     "karma-jasmine": "^5.0.0",
     "karma-jasmine-html-reporter": "^2.0.0",
-    "karma-webpack": "^5.0.1",
-    "mini-css-extract-plugin": "^2.6.0",
     "minify-html-literals-loader": "^1.1.1",
     "minimist": "^1.2.6",
     "po-loader": "0.7.0",
@@ -125,13 +122,8 @@
     "sass": "^1.86.2",
     "sass-loader": "^16.0.5",
     "style-loader": "^4.0.0",
-    "swc-loader": "^0.2.6",
     "typescript": "5.6.2",
-    "uglify-js": "^3.17.4",
-    "webpack": "^5.90.3",
-    "webpack-cli": "^5.1.4",
-    "webpack-dev-server": "^5.0.3",
-    "webpack-merge": "^5.10.0"
+    "webpack-merge": "^6.0.1"
   },
   "dependencies": {
     "@babel/runtime": "^7.27.6",

+ 101 - 0
rspack/rspack.build.js

@@ -0,0 +1,101 @@
+const { rspack } = require('@rspack/core');
+const path = require('path');
+const { merge } = require('webpack-merge');
+const common = require('../rspack/rspack.common.js');
+
+const plugins = [
+    new rspack.CssExtractRspackPlugin({
+        filename: '../dist/converse.min.css',
+    }),
+    new rspack.CssExtractRspackPlugin({
+        filename: '../dist/converse.css',
+    }),
+    new rspack.CopyRspackPlugin({
+        patterns: [
+            { from: 'node_modules/strophe.js/src/shared-connection-worker.js', to: 'shared-connection-worker.js' },
+            { from: 'sounds', to: 'sounds' },
+            { from: 'images/favicon.ico', to: 'images/favicon.ico' },
+            { from: 'images/custom_emojis', to: 'images/custom_emojis' },
+            { from: 'logo/conversejs-filled-192.png', to: 'images/logo' },
+            { from: 'logo/conversejs-filled-512.png', to: 'images/logo' },
+            { from: 'logo/conversejs-filled-192.svg', to: 'images/logo' },
+            { from: 'logo/conversejs-filled-512.svg', to: 'images/logo' },
+            { from: 'logo/conversejs-filled.svg', to: 'images/logo' },
+            { from: 'logo/conversejs-gold-gradient.svg', to: 'images/logo' },
+            { from: 'src/shared/styles/webfonts', to: 'webfonts' },
+            { from: 'manifest.json', to: 'manifest.json' },
+        ],
+    }),
+];
+
+module.exports = merge(common, {
+    plugins,
+    entry: {
+        'converse': path.resolve(__dirname, '../src/entry.js'),
+        'converse.min': path.resolve(__dirname, '../src/entry.js'),
+    },
+    output: {
+        filename: '[name].js',
+    },
+    mode: 'production',
+    optimization: {
+        minimize: true,
+        minimizer: [
+            new rspack.SwcJsMinimizerRspackPlugin({
+                minimizerOptions: {
+                    minify: true,
+                    mangle: true,
+                    compress: {
+                        passes: 2,
+                    },
+                    format: {
+                        comments: false,
+                    },
+                },
+            }),
+            new rspack.LightningCssMinimizerRspackPlugin(),
+        ],
+    },
+    module: {
+        rules: [
+            {
+                test: /\.(js|ts)$/,
+                use: [
+                    {
+                        loader: 'minify-html-literals-loader',
+                    },
+                ],
+            },
+            {
+                test: /\.scss$/,
+                use: [
+                    rspack.CssExtractRspackPlugin.loader,
+                    {
+                        loader: 'css-loader',
+                        options: {
+                            url: false,
+                            sourceMap: true,
+                        },
+                    },
+                    {
+                        loader: 'postcss-loader',
+                        options: { sourceMap: true },
+                    },
+                    {
+                        loader: 'sass-loader',
+                        options: {
+                            sassOptions: {
+                                silenceDeprecations: ['color-functions', 'global-builtin', 'import', 'mixed-decls'],
+                                includePaths: [
+                                    path.resolve(__dirname, '../node_modules/'),
+                                    path.resolve(__dirname, '../src/'),
+                                ],
+                            },
+                            sourceMap: true,
+                        },
+                    },
+                ],
+            },
+        ],
+    },
+});

+ 94 - 0
rspack/rspack.common.js

@@ -0,0 +1,94 @@
+const { rspack } = require('@rspack/core');
+const path = require('path');
+
+module.exports = {
+    plugins: [
+        new rspack.DefinePlugin({
+            'process.env.ASSET_PATH': JSON.stringify(process.env.ASSET_PATH || '/dist/'),
+        }),
+        new rspack.CircularDependencyRspackPlugin({
+            exclude: /node_modules/,
+            failOnError: true,
+            allowAsyncCycles: false,
+            cwd: process.cwd(),
+        }),
+    ],
+    output: {
+        path: path.resolve(__dirname, '../dist'),
+        publicPath: process.env.ASSET_PATH || '/dist/',
+        chunkFilename: '[name].js',
+    },
+    devtool: 'source-map',
+    module: {
+        rules: [
+            {
+                test: /LC_MESSAGES[\\/]converse.po$/,
+                type: 'json',
+                use: [
+                    {
+                        loader: 'po-loader',
+                        options: {
+                            'format': 'jed',
+                            'domain': 'converse',
+                        },
+                    },
+                ],
+            },
+            {
+                test: /webfonts[\\/].*\.(woff(2)?|ttf|eot|truetype|svg)(\?v=\d+\.\d+\.\d+)?$/,
+                type: 'asset/resource',
+                generator: {
+                    filename: '[name][ext]',
+                    publicPath: 'webfonts/',
+                    outputPath: 'webfonts/',
+                },
+            },
+            {
+                test: /\.scss$/,
+                use: [
+                    'style-loader',
+                    {
+                        loader: 'css-loader',
+                        options: {
+                            url: false,
+                            sourceMap: true,
+                        },
+                    },
+                    {
+                        loader: 'postcss-loader',
+                        options: { sourceMap: true },
+                    },
+                    {
+                        loader: 'sass-loader',
+                        options: {
+                            sassOptions: {
+                                silenceDeprecations: ['color-functions', 'global-builtin', 'import', 'mixed-decls'],
+                                includePaths: [
+                                    path.resolve(__dirname, '../node_modules/'),
+                                    path.resolve(__dirname, '../src/'),
+                                ],
+                            },
+                            sourceMap: true,
+                        },
+                    },
+                ],
+            },
+        ],
+    },
+    resolve: {
+        extensions: ['.js'],
+        modules: ['node_modules', path.resolve(__dirname, '../src')],
+        alias: {
+            'IPv6': path.resolve(__dirname, '../node_modules/urijs/src/IPv6'),
+            'SecondLevelDomains': path.resolve(__dirname, '../node_modules/urijs/src/SecondLevelDomains'),
+            'punycode': path.resolve(__dirname, '../node_modules/urijs/src/punycode'),
+        },
+    },
+    watchOptions: {
+        ignored: [
+            path.posix.resolve(__dirname, '../node_modules'),
+            path.posix.resolve(__dirname, '../3rdparty'),
+            path.posix.resolve(__dirname, '../dist'),
+        ],
+    },
+};

+ 37 - 0
rspack/rspack.headless.js

@@ -0,0 +1,37 @@
+const path = require('path');
+const { merge } = require('webpack-merge');
+const common = require('../rspack/rspack.common.js');
+
+module.exports = merge(common, {
+    entry: {
+        'converse-headless': '@converse/headless',
+        'converse-headless.min': '@converse/headless',
+    },
+    output: {
+        path: path.resolve(__dirname, '../src/headless/dist'),
+        filename: '[name].js',
+        chunkFilename: '[name].js',
+        globalObject: 'this',
+        library: {
+            name: 'converse',
+            type: 'umd',
+        },
+    },
+    mode: 'production',
+    module: {
+        rules: [
+            {
+                test: /\.js$/,
+                include: [
+                    /src/,
+                    /node_modules\/mergebounce/,
+                    /node_modules\/lit-html/,
+                    /node_modules\/strophe/,
+                    /node_modules\/pluggable/,
+                    /node_modules\/@converse/,
+                ],
+                type: 'javascript/auto', // Let RSPack handle these files with built-in SWC
+            },
+        ],
+    },
+});

+ 76 - 0
rspack/rspack.nodeps.js

@@ -0,0 +1,76 @@
+const { rspack } = require('@rspack/core');
+const path = require('path');
+const { merge } = require('webpack-merge');
+const common = require('../rspack/rspack.common.js');
+
+module.exports = merge(common, {
+    mode: 'production',
+    optimization: {
+        minimize: false,
+    },
+    entry: {
+        'converse-no-dependencies': path.resolve(__dirname, '../src/entry.js'),
+    },
+    plugins: [
+        new rspack.CssExtractRspackPlugin({ filename: 'tmp.css' }),
+        new rspack.DefinePlugin({
+            'process.env.NODE_ENV': JSON.stringify('production'),
+        }),
+    ],
+    module: {
+        rules: [
+            {
+                test: /\.js$/,
+                include: /src/,
+                use: {
+                    loader: 'builtin:swc-loader',
+                    options: {
+                        jsc: {
+                            target: 'es5',
+                            preserveAllComments: true,
+                            parser: {
+                                syntax: 'ecmascript',
+                                dynamicImport: false,
+                                decorators: false,
+                            },
+                        },
+                    },
+                },
+            },
+            {
+                test: /\.scss$/,
+                use: [
+                    rspack.CssExtractRspackPlugin.loader,
+                    'css-loader',
+                    {
+                        loader: 'sass-loader',
+                        options: {
+                            api: 'modern-compiler',
+                            sassOptions: {
+                                silenceDeprecations: ['color-functions', 'global-builtin', 'import', 'mixed-decls'],
+                                includePaths: [path.resolve(__dirname, '../node_modules/')],
+                            },
+                        },
+                    },
+                ],
+            },
+        ],
+    },
+    externals: [
+        {
+            '@converse/skeletor': 'skeletor',
+            'filesize': 'filesize',
+            'jed': 'jed',
+            'lit': 'lit',
+            'lit-html': 'lit-html',
+            'localforage': 'localforage',
+            'lodash': 'lodash',
+            'lodash.noconflict': 'lodash.noconflict',
+            'pluggable.js': 'pluggable',
+            'sizzle': 'sizzle',
+            'strophe.js': 'strophe',
+            'urijs': 'urijs',
+            'window': 'window',
+        },
+    ],
+});

+ 24 - 0
rspack/rspack.serve.js

@@ -0,0 +1,24 @@
+const common = require('../rspack/rspack.common.js');
+const path = require('path');
+const { merge } = require('webpack-merge');
+
+module.exports = merge(common, {
+    mode: 'development',
+    entry: {
+        'converse': path.resolve(__dirname, '../src/entry.js'),
+    },
+    devtool: 'inline-source-map',
+    devServer: {
+        static: {
+            directory: path.resolve(__dirname, '../'),
+        },
+        port: 3003,
+        allowedHosts: ['localhost'],
+        devMiddleware: {
+            publicPath: '/dist/',
+        },
+    },
+    watchOptions: {
+        ignored: [path.posix.resolve(__dirname, '../node_modules'), path.posix.resolve(__dirname, '../3rdparty')],
+    },
+});

+ 1 - 1
src/plugins/muc-views/tests/csn.js

@@ -104,7 +104,7 @@ describe("Groupchats", function () {
                 const remove_notifications_timeouts = [];
                 const setTimeout = window.setTimeout;
                 spyOn(window, 'setTimeout').and.callFake((f, w) => {
-                    if (f.toString() === "()=>this.removeNotification(actor, state)") {
+                    if (f.toString() === '()=>this.removeNotification(e,t)') {
                         remove_notifications_timeouts.push(f)
                     }
                     setTimeout(f, w);

+ 0 - 84
webpack/webpack.build.js

@@ -1,84 +0,0 @@
-/* global __dirname, module, process */
-const CircularDependencyPlugin = require('circular-dependency-plugin');
-const CopyWebpackPlugin = require('copy-webpack-plugin');
-const MiniCssExtractPlugin = require('mini-css-extract-plugin');
-const common = require("./webpack.common.js");
-const path = require('path');
-const { merge }  = require("webpack-merge");
-
-const plugins = [
-    new MiniCssExtractPlugin({filename: '../dist/converse.min.css'}),
-    new MiniCssExtractPlugin({filename: '../dist/converse.css'}),
-    new CopyWebpackPlugin({
-        patterns: [
-            {from: 'node_modules/strophe.js/src/shared-connection-worker.js', to: 'shared-connection-worker.js'},
-            {from: 'sounds', to: 'sounds'},
-            {from: 'images/favicon.ico', to: 'images/favicon.ico'},
-            {from: 'images/custom_emojis', to: 'images/custom_emojis'},
-            {from: 'logo/conversejs-filled-192.png', to: 'images/logo'},
-            {from: 'logo/conversejs-filled-512.png', to: 'images/logo'},
-            {from: 'logo/conversejs-filled-192.svg', to: 'images/logo'},
-            {from: 'logo/conversejs-filled-512.svg', to: 'images/logo'},
-            {from: 'logo/conversejs-filled.svg', to: 'images/logo'},
-            {from: 'logo/conversejs-gold-gradient.svg', to: 'images/logo'},
-            {from: 'src/shared/styles/webfonts', to: 'webfonts'},
-            {from: 'manifest.json', to: 'manifest.json'}
-        ]
-    }),
-    new CircularDependencyPlugin({
-      exclude: /node_modules/,
-      failOnError: true,
-      allowAsyncCycles: false,
-      cwd: process.cwd(),
-    })
-];
-
-module.exports = merge(common, {
-    plugins,
-    entry: {
-        "converse": path.resolve(__dirname, "../src/entry.js"),
-        "converse.min": path.resolve(__dirname, "../src/entry.js"),
-    },
-    output: {
-        filename: "[name].js",
-    },
-    mode: "production",
-    module: {
-        rules: [{
-            test: /\.(js|ts)$/,
-            use: [{
-                loader: 'minify-html-literals-loader'
-            }]
-        },
-        {
-            test: /\.scss$/,
-            use: [
-                MiniCssExtractPlugin.loader,
-                {
-                    loader: 'css-loader',
-                    options: {
-                        url: false,
-                        sourceMap: true
-                    }
-                },
-                {
-                    loader: "postcss-loader",
-                    options: { sourceMap: true }
-                },
-                {
-                    loader: 'sass-loader',
-                    options: {
-                        sassOptions: {
-                            silenceDeprecations: ['color-functions', 'global-builtin', 'import', 'mixed-decls'],
-                            includePaths: [
-                                path.resolve(__dirname, '../node_modules/'),
-                                path.resolve(__dirname, '../src/')
-                            ]
-                        },
-                        sourceMap: true
-                    }
-                },
-            ]
-        }]
-    }
-});

+ 0 - 132
webpack/webpack.common.js

@@ -1,132 +0,0 @@
-/* global __dirname, module, process */
-const ASSET_PATH = process.env.ASSET_PATH || '/dist/'; // eslint-disable-line no-process-env
-const webpack = require('webpack');
-const TerserPlugin = require("terser-webpack-plugin");
-const path = require('path');
-
-const plugins = [
-    new webpack.DefinePlugin({ // This makes it possible for us to safely use env vars on our code
-        'process.env.ASSET_PATH': JSON.stringify(ASSET_PATH)
-    }),
-];
-
-module.exports = {
-    plugins,
-    output: {
-        path: path.resolve(__dirname, '../dist'), // Output path for generated bundles
-        publicPath: ASSET_PATH,
-        chunkFilename: '[name].js'
-    },
-    devtool: "source-map",
-    optimization: {
-        minimize: true,
-        minimizer: [
-            new TerserPlugin({
-                include: /\.min\.js$/
-            })
-        ],
-    },
-    externals: [{
-        "window": "window"
-    }],
-    watchOptions: {
-        ignored: [
-            path.posix.resolve(__dirname, '../develop-eggs'),
-            path.posix.resolve(__dirname, '../dist'),
-            path.posix.resolve(__dirname, '../docs'),
-            path.posix.resolve(__dirname, '../node_modules'),
-            path.posix.resolve(__dirname, '../src/headless/dist'),
-            path.posix.resolve(__dirname, '../src/headless/node_modules'),
-            path.posix.resolve(__dirname, '../webpack'),
-        ],
-    },
-    module: {
-        rules: [{
-            test: /LC_MESSAGES[\\/]converse.po$/,
-            type: "json",
-            use: [
-            {
-                loader: 'po-loader',
-                options: {
-                    'format': 'jed',
-                    'domain': 'converse'
-                }
-            }
-            ]
-        }, {
-            test: /webfonts[\\/].*\.(woff(2)?|ttf|eot|truetype|svg)(\?v=\d+\.\d+\.\d+)?$/,
-            type: 'asset/resource',
-            generator: {
-                filename: '[name][ext]',
-                publicPath: 'webfonts/',
-                outputPath: 'webfonts/'
-            }
-        }, {
-            test: /\.scss$/,
-            use: [
-                'style-loader',
-                {
-                    loader: 'css-loader',
-                    options: {
-                        url: false,
-                        sourceMap: true
-
-                    }
-                },
-                {
-                    loader: "postcss-loader",
-                    options: { sourceMap: true }
-                },
-                {
-                    loader: 'sass-loader',
-                    options: {
-                        sassOptions: {
-                            silenceDeprecations: ['color-functions', 'global-builtin', 'import', 'mixed-decls'],
-                            includePaths: [
-                                path.resolve(__dirname, '../node_modules/'),
-                                path.resolve(__dirname, '../src/')
-                            ]
-                        },
-                        sourceMap: true
-                    }
-                },
-            ]
-        }, {
-            test: /\.js$/,
-            include: [
-                /src/,
-                /node_modules\/mergebounce/,
-                /node_modules\/lit-html/,
-                /node_modules\/strophe/,
-                /node_modules\/pluggable/,
-                /node_modules\/@converse/,
-            ],
-            use: {
-                loader: 'swc-loader',
-                options: {
-                    jsc: {
-                        parser: {
-                            syntax: 'ecmascript',
-                            jsx: false,
-                            dynamicImport: true,
-                        },
-                        target: 'es2015',
-                    }
-                }
-            }
-        }],
-    },
-    resolve: {
-        extensions: ['.js'],
-        modules: [
-            'node_modules',
-            path.resolve(__dirname, "../src")
-        ],
-        alias: {
-            "IPv6":                     path.resolve(__dirname, "../node_modules/urijs/src/IPv6"),
-            "SecondLevelDomains":       path.resolve(__dirname, "../node_modules/urijs/src/SecondLevelDomains"),
-            "punycode":                 path.resolve(__dirname, "../node_modules/urijs/src/punycode"),
-        }
-    }
-
-}

+ 0 - 22
webpack/webpack.headless.js

@@ -1,22 +0,0 @@
-/* global __dirname, module */
-const common = require("./webpack.common.js");
-const path = require('path');
-const { merge } = require("webpack-merge");
-
-module.exports = merge(common, {
-    entry: {
-        "converse-headless": "@converse/headless",
-        "converse-headless.min": "@converse/headless",
-    },
-    output: {
-        path: path.resolve(__dirname, '../src/headless/dist'), // Output path for generated bundles
-        filename: "[name].js",
-        chunkFilename: '[name].js',
-        globalObject: 'this',
-        library: {
-            name: 'converse',
-            type: 'umd',
-        },
-    },
-    mode: "production",
-});

+ 0 - 67
webpack/webpack.nodeps.js

@@ -1,67 +0,0 @@
-/* global module, __dirname */
-const MiniCssExtractPlugin = require('mini-css-extract-plugin');
-const common = require("./webpack.common.js");
-const path = require('path');
-const { merge}  = require("webpack-merge");
-
-module.exports = merge(common, {
-    mode: "production",
-    entry: {
-        "converse-no-dependencies": path.resolve(__dirname, "../src/entry.js"),
-    },
-    plugins: [
-        new MiniCssExtractPlugin({filename: 'tmp.css'})
-    ],
-    module: {
-        rules: [
-        {
-            test: /\.js$/,
-            include: /src/,
-            use: {
-                loader: 'swc-loader',
-                options: {
-                    jsc: {
-                        target: 'es5',
-                        parser: {
-                            syntax: 'ecmascript',
-                            jsx: false,
-                            dynamicImport: false,
-                        },
-                    }
-                }
-            }
-        },
-        {
-            test: /\.scss$/,
-            use: [
-                MiniCssExtractPlugin.loader,
-                'css-loader',
-                {
-                    loader: 'sass-loader',
-                    options: {
-                        api: "modern-compiler",
-                        sassOptions: {
-                            silenceDeprecations: ['color-functions', 'global-builtin', 'import', 'mixed-decls'],
-                            includePaths: [path.resolve(__dirname, '../node_modules/')]
-                        }
-                    }
-                }
-            ]
-        }]
-    },
-    externals: [{
-        '@converse/skeletor': 'skeletor',
-        'filesize': 'filesize',
-        'jed': 'jed',
-        'lit': 'lit',
-        'lit-html': 'lit-html',
-        'localforage': 'localforage',
-        'lodash': 'lodash',
-        'lodash.noconflict': 'lodash.noconflict',
-        'pluggable.js': 'pluggable',
-        'sizzle': 'sizzle',
-        'strophe.js': 'strophe',
-        'urijs': 'urijs',
-        'window': 'window',
-    }]
-});

+ 0 - 17
webpack/webpack.serve.js

@@ -1,17 +0,0 @@
-/* global module, __dirname */
-const common = require("./webpack.common.js");
-const { merge } = require("webpack-merge");
-const path = require("path");
-
-module.exports = merge(common, {
-    mode: "development",
-    entry: {
-        "converse": path.resolve(__dirname, "../src/entry.js"),
-    },
-    devtool: "inline-source-map",
-    devServer: {
-        static: [ path.resolve(__dirname, '../') ],
-        port: 3003,
-        allowedHosts: ['localhost'],
-    }
-});

Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff