Difference between revisions of "Webpack"

From Tweeki
Jump to: navigation, search
Line 1: Line 1:
 
=== Using Webpack to customize the styles ===
 
=== Using Webpack to customize the styles ===
 +
 +
Install node.js
 +
 +
sudo apt-get install nodejs npm
  
 
Install webpack dependencies
 
Install webpack dependencies

Revision as of 14:39, 2 September 2021

Using Webpack to customize the styles

Install node.js

sudo apt-get install nodejs npm

Install webpack dependencies

npm install

Create your customized scripts and styles

mv resources/scripts/example.custom.js resources/scripts/custom.js
mv resources/styles/example.custom.scss resources/styles/custom.scss

Create customized files

npm run prod

Tell MediaWiki to use the custom files with this line in LocalSettings.php

$wgTweekiSkinUseCustomFiles = true;