Adding custom webpack file for ConverseJS.
This commit is contained in:
parent
b0eadd577d
commit
9e640dd5bc
@ -5,6 +5,7 @@
|
||||
### Features
|
||||
|
||||
* Brand new documentation, in french and english. (Work in Progress)
|
||||
* UI/UX improvements. Now using a custom ConverseJS build.
|
||||
|
||||
### Minor changes and fixes
|
||||
|
||||
|
@ -28,9 +28,23 @@ else
|
||||
cp -R $converse_src_dir/* "$converse_build_dir"
|
||||
fi
|
||||
|
||||
echo "Building ConverseJS"
|
||||
echo "Removing existing custom files...\n"
|
||||
rm -rf "$converse_build_dir/custom/"
|
||||
|
||||
echo "Adding the custom files...\n"
|
||||
cp -r "$src_dir/custom/" "$converse_build_dir/custom/"
|
||||
mv "$converse_build_dir/custom/webpack.livechat.js" "$converse_build_dir/"
|
||||
|
||||
if [[ ! -d "$converse_build_dir/node_modules" ]]; then
|
||||
echo "Missing node_modules directory, seems we have to call the makefile...\n"
|
||||
cd "$converse_build_dir"
|
||||
make node_modules src/*
|
||||
cd $rootdir
|
||||
fi
|
||||
|
||||
echo "Building ConverseJS...\n"
|
||||
cd "$converse_build_dir"
|
||||
make dist
|
||||
npx webpack --config webpack.livechat.js
|
||||
cd $rootdir
|
||||
|
||||
echo "Copying ConverseJS dist files...\n"
|
||||
|
13
conversejs/custom/webpack.livechat.js
Normal file
13
conversejs/custom/webpack.livechat.js
Normal file
@ -0,0 +1,13 @@
|
||||
const prod = require('./webpack.prod.js')
|
||||
const { merge } = require('webpack-merge')
|
||||
// const path = require('path')
|
||||
|
||||
module.exports = merge(prod, {
|
||||
resolve: {
|
||||
extensions: ['.js'],
|
||||
alias: {
|
||||
// To override a template, use this syntax:
|
||||
// 'templates/muc_sidebar.js': path.resolve(__dirname, 'custom/templates/muc_sidebar.js')
|
||||
}
|
||||
}
|
||||
})
|
Loading…
Reference in New Issue
Block a user