1
0
Fork 0
pixelfed/webpack.mix.js

76 lines
2.3 KiB
JavaScript
Raw Normal View History

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");
mix.before(() => {
2023-06-11 22:47:23 +00:00
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')
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')
.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({
2023-06-11 22:47:23 +00:00
processCssUrls: false,
terser: {
parallel: true,
terserOptions: {
compress: true,
output: {
comments: false
}
}
}
2023-06-11 22:20:05 +00:00
})
mix.webpackConfig({
2023-06-11 22:47:23 +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({
2023-06-11 22:47:23 +00:00
jquery: ['$', 'jQuery', 'window.jQuery']
2023-06-11 22:20:05 +00:00
});