pixelfed/webpack.mix.js

89 wiersze
3.0 KiB
JavaScript
Czysty Zwykły widok Historia

2018-04-15 23:56:48 +00:00
let mix = require('laravel-mix');
2023-06-11 22:20:05 +00:00
const fs = require("fs");
2024-04-20 06:55:21 +00:00
const path = require("path");
2023-06-11 22:20:05 +00:00
mix.before(() => {
2024-04-20 06:55:21 +00:00
fs.rmSync('public/css', { recursive: true, force: true });
fs.rmSync('public/js', { recursive: true, force: true });
2023-06-11 22:20:05 +00:00
});
2018-04-15 23:56:48 +00:00
2021-04-07 03:17:42 +00:00
mix.sass('resources/assets/sass/app.scss', 'public/css')
.sass('resources/assets/sass/appdark.scss', 'public/css')
2021-05-25 05:24:42 +00:00
.sass('resources/assets/sass/admin.scss', 'public/css')
2023-06-11 22:20:05 +00:00
.sass('resources/assets/sass/portfolio.scss', 'public/css')
.sass('resources/assets/sass/spa.scss', 'public/css')
2024-10-14 05:19:58 +00:00
.sass('resources/assets/sass/profile.scss', 'public/css')
2021-12-15 04:37:19 +00:00
.sass('resources/assets/sass/landing.scss', 'public/css').version();
2018-04-15 23:56:48 +00:00
mix.js('resources/assets/js/app.js', 'public/js')
2019-02-03 21:53:13 +00:00
.js('resources/assets/js/activity.js', 'public/js')
.js('resources/assets/js/components.js', 'public/js')
2019-02-11 05:40:22 +00:00
.js('resources/assets/js/discover.js', 'public/js')
.js('resources/assets/js/profile.js', 'public/js')
.js('resources/assets/js/status.js', 'public/js')
2019-02-03 21:53:13 +00:00
.js('resources/assets/js/timeline.js', 'public/js')
2019-03-26 04:22:25 +00:00
.js('resources/assets/js/compose.js', 'public/js')
2019-08-23 04:33:04 +00:00
.js('resources/assets/js/compose-classic.js', 'public/js')
.js('resources/assets/js/search.js', 'public/js')
2019-04-07 18:15:36 +00:00
.js('resources/assets/js/developers.js', 'public/js')
2019-07-08 04:26:44 +00:00
.js('resources/assets/js/hashtag.js', 'public/js')
2019-07-18 01:10:08 +00:00
.js('resources/assets/js/collectioncompose.js', 'public/js')
.js('resources/assets/js/collections.js', 'public/js')
2019-11-24 23:02:37 +00:00
.js('resources/assets/js/profile-directory.js', 'public/js')
2020-01-01 02:29:50 +00:00
.js('resources/assets/js/story-compose.js', 'public/js')
2023-06-11 22:20:05 +00:00
.js('resources/assets/js/direct.js', 'public/js')
2021-05-25 05:24:42 +00:00
.js('resources/assets/js/admin.js', 'public/js')
2023-06-11 22:20:05 +00:00
.js('resources/assets/js/spa.js', 'public/js')
.js('resources/assets/js/stories.js', 'public/js')
.js('resources/assets/js/portfolio.js', 'public/js')
2023-06-12 11:26:24 +00:00
.js('resources/assets/js/account-import.js', 'public/js')
2023-06-11 22:20:05 +00:00
.js('resources/assets/js/admin_invite.js', 'public/js')
.js('resources/assets/js/landing.js', 'public/js')
.js('resources/assets/js/remote_auth.js', 'public/js')
2024-07-10 05:52:08 +00:00
.js('resources/assets/js/groups.js', 'public/js')
.js('resources/assets/js/group-status.js', 'public/js')
.js('resources/assets/js/group-topic-feed.js', 'public/js')
2025-04-14 06:07:25 +00:00
.js('resources/assets/js/custom_filters.js', 'public/js')
Staging (#5978) * Added current title as value for input so that the current value remains stored by default * Added parameter 'show_legal_notice_link' => (bool) config_cache('instance.has_legal_notice'), * Added conditional display of a link to legal notice if the page is active * Added key 'legalNotice' * feat translate story * translate auth - register - login * add remove follow * Update ApiV1Controller.php Co-Authored-By: Mathieu <385764+Casmo@users.noreply.github.com> * New translations web.php (Chinese Simplified) [ci skip] * Added current title as value for input so that the current value remains stored by default * Added parameter 'show_legal_notice_link' => (bool) config_cache('instance.has_legal_notice'), * Added conditional display of a link to legal notice if the page is active * Added key 'legalNotice' * add missing key * add missing keys * New translations web.php (Portuguese, Brazilian) [ci skip] * New translations web.php (Turkish) [ci skip] * New translations web.php (Italian) [ci skip] * translate custom filter * New translations web.php (Italian) [ci skip] * use configured alt text length limit when uploading multiple photos * in notifications sidebar, show popover on shared posts too, not just liked posts * use case insensitive search when tagging accounts * New translations web.php (Portuguese, Brazilian) [ci skip] * Generic OIDC Support * Everything should be configurable by env variables * Basic request tests * Fixes for items highlighted by review.ai * Consider using `hash_equals()` instead of `==` when comparing the state values to prevent timing attacks: `abort_unless(hash_equals($request->input('state'), $request->session()->pull('oauth2state')), 400, 'invalid state');` * For better data integrity, consider adding a foreign key constraint to the user_id column: `$table- >foreign('user_id')->references('id')->on('users')->onDelete('cascade');` * Does the OIDC provider guarantee that the username field exists in the userInfo data? Consider adding a null check or fallback: `$userInfoData[config('remote-auth.oidc.field_username')] ?? null` * field isnt accessTokenResourceOwnerId but responseResourceOwnerId * New translations web.php (Dutch) [ci skip] * Fix components * Update LandingService and Config util to properly support the legal_notice setting * Update footer to use legalNotice i18n * Update i18n * Update sidebar with gap padding for footer links * Update compiled assets * Update i18n json * Update OIDC config with comments, and disable tests as we dont have db tests configured * Update remove_from_followers api endpoint * Update i18n * Update compiled assets * Update changelog * New supported formats, Preserve ICC Color Profiles, libvips support Update image pipeline to handle avif, heic and webp and preserve ICC color profiles and added libvips support. * Fix tests * Update CHANGELOG.md --------- Co-authored-by: Samy Elshamy <elshamy@coderbutze.de> Co-authored-by: Felipe Mateus <eu@felipemateus.com> Co-authored-by: Mathieu <385764+Casmo@users.noreply.github.com> Co-authored-by: Mackenzie Morgan <macoafi@gmail.com> Co-authored-by: Gavin Mogan <git@gavinmogan.com>
2025-05-13 08:25:23 +00:00
.js('resources/assets/js/settings.js', 'public/js')
2023-06-11 22:20:05 +00:00
.vue({ version: 2 });
mix.extract();
mix.version();
const TerserPlugin = require('terser-webpack-plugin');
2019-07-18 01:10:08 +00:00
2023-06-11 22:20:05 +00:00
mix.options({
2024-04-20 06:55:21 +00:00
processCssUrls: false,
terser: {
parallel: true,
terserOptions: {
compress: true,
output: {
comments: false
}
}
}
2023-06-11 22:20:05 +00:00
})
2024-04-20 06:55:21 +00:00
mix.alias({
'@': path.join(__dirname, 'resources/assets/components'),
'~': path.join(__dirname, 'resources/assets/js/components'),
});
2023-06-11 22:20:05 +00:00
mix.webpackConfig({
2024-04-20 06:55:21 +00:00
optimization: {
providedExports: false,
sideEffects: false,
usedExports: false,
minimize: true,
minimizer: [ new TerserPlugin({
extractComments: false,
})]
},
output: {
chunkFilename: 'js/[name].[chunkhash].js',
}
2023-06-11 22:20:05 +00:00
});
mix.autoload({
2024-04-20 06:55:21 +00:00
jquery: ['$', 'jQuery', 'window.jQuery']
2023-06-11 22:20:05 +00:00
});