Uh oh!
There was an error while loading. Please reload this page.
fix: use webpack for npm dependencies - #163
Conversation
5277144 to
e944a43CompareReenigneArcher
commented
Mar 15, 2024
@TheElixZammuto would you be able to give this a review? This is my first time using webpack and want to make sure I'm not doing anything wrong. Everything seems to work, but one thing I don't like it the new paths for the dependencies.
I would like I did find a way to accomplish that with the below code, but it seems pretty hacky. It also creates an empty constpath=require('path');constMiniCssExtractPlugin=require('mini-css-extract-plugin');functiongenerateEntry(entries){constentry={};entries.forEach(entryPoint=>{letkey=entryPoint;if(entryPoint.startsWith('script-loader!')){key=entryPoint.replace('script-loader!','');}constdir=path.dirname(key);constfilename=path.basename(key,path.extname(key));// filename without extensionkey=path.join(dir,filename);entry[key]=entryPoint;});returnentry;}module.exports={entry: generateEntry(['bootstrap/dist/js/bootstrap.bundle.min.js','bootstrap/dist/css/bootstrap.min.css','@fortawesome/fontawesome-free/css/all.min.css','jquery/dist/jquery.min.js','@popperjs/core/dist/umd/popper.min.js',]),output: {filename: '[name].js',path: path.resolve(__dirname,'dist'),},mode: 'production',module: {rules: [{test: /\.css$/,use: [MiniCssExtractPlugin.loader,'css-loader'],},],},plugins: [newMiniCssExtractPlugin({filename: '[name].css',}),],};Anyway, I'd appreciate any pointers on this so I don't propagate any bad practices over to other repos. |
TheElixZammuto
commented
Mar 16, 2024
Any reason why you are not using Vite instead? It does not require Vue and it works as expected on Sunshine, I think you might cover 99% of the work you're trying to do with the work we've already done on Sunshine |
ReenigneArcher
commented
Mar 16, 2024
The only reason being that webpack came up first in search results. I know that vite is newer and gaining popularity though. |
e944a43 to
1bfd2a7Compare1bfd2a7 to
5cbf082CompareReenigneArcher
commented
Oct 14, 2024
Closing in favor of #186 |
Description
./distto./srcTodo:
Screenshot
Issues Fixed or Closed
Type of Change
.github/...)Checklist
Branch Updates
LizardByte requires that branches be up-to-date before merging. This means that after any PR is merged, this branch
must be updated before it can be merged. You must also
Allow edits from maintainers.