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(() => {
|
|
|
|
fs.rmSync('public/js', { recursive: true, force: true });
|
|
|
|
});
|
|
|
|
|
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();
|
2019-06-11 02:56:14 +00:00
|
|
|
|
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')
|
2019-04-02 05:46:59 +00:00
|
|
|
.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')
|
|
|
|
.js('resources/assets/js/installer.js', 'public/js')
|
|
|
|
.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({
|
|
|
|
processCssUrls: false,
|
|
|
|
terser: {
|
|
|
|
parallel: true,
|
|
|
|
terserOptions: {
|
|
|
|
compress: true,
|
|
|
|
output: {
|
|
|
|
comments: false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
mix.webpackConfig({
|
|
|
|
optimization: {
|
|
|
|
providedExports: false,
|
|
|
|
sideEffects: false,
|
|
|
|
usedExports: false,
|
|
|
|
minimize: true,
|
|
|
|
minimizer: [ new TerserPlugin({
|
|
|
|
extractComments: false,
|
|
|
|
})]
|
|
|
|
},
|
|
|
|
output: {
|
|
|
|
chunkFilename: 'js/[name].[chunkhash].js',
|
|
|
|
}
|
|
|
|
});
|
|
|
|
mix.autoload({
|
|
|
|
jquery: ['$', 'jQuery', 'window.jQuery']
|
|
|
|
});
|