Browse Source

Bugfix. Chunks not loading when using converse.js build

(Although they do load when using converse.min.js)

I wasn't able to figure out why exactly, but setting `mode` to
`production` for the `converse.js` build solved the issue.
JC Brand 3 years ago
parent
commit
f929f8b7f9
4 changed files with 6 additions and 4 deletions
  1. 1 1
      src/headless/plugins/muc/muc.js
  2. 1 1
      webpack/webpack.dev.js
  3. 0 1
      webpack/webpack.nodeps.js
  4. 4 1
      webpack/webpack.prod.js

+ 1 - 1
src/headless/plugins/muc/muc.js

@@ -575,7 +575,7 @@ const ChatRoomMixin = {
         try {
             attrs = await parseMUCMessage(stanza, this, _converse);
         } catch (e) {
-            return log.error(e.message);
+            return log.error(e);
         }
         const data = { stanza, attrs, 'chatbox': this };
         /**

+ 1 - 1
webpack/webpack.dev.js

@@ -4,7 +4,7 @@ const prod = require("./webpack.prod.js");
 const { merge } = require("webpack-merge");
 
 module.exports = merge(prod, {
-    mode: "development",
+    mode: "production",
     output: {
         filename: 'converse.js',
     },

+ 0 - 1
webpack/webpack.nodeps.js

@@ -65,7 +65,6 @@ module.exports = merge(common, {
         'lodash.noconflict': 'lodash.noconflict',
         'sizzle': 'sizzle',
         'strophe.js': 'strophe',
-        'twemoji': 'twemoji',
         'urijs': 'urijs',
         'window': 'window',
     }]

+ 4 - 1
webpack/webpack.prod.js

@@ -54,7 +54,10 @@ module.exports = merge(common, {
                     loader: 'sass-loader',
                     options: {
                         sassOptions: {
-                            includePaths: [path.resolve(__dirname, '../node_modules/')]
+                            includePaths: [
+                                path.resolve(__dirname, '../node_modules/'),
+                                path.resolve(__dirname, '../src/')
+                            ]
                         },
                         sourceMap: true
                     }