mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-22 13:03:16 +00:00
Update webpack
This commit is contained in:
parent
d48e8d9832
commit
adf015be43
1 changed files with 50 additions and 14 deletions
64
webpack.mix.js
vendored
64
webpack.mix.js
vendored
|
@ -1,8 +1,16 @@
|
||||||
let mix = require('laravel-mix');
|
let mix = require('laravel-mix');
|
||||||
|
const fs = require("fs");
|
||||||
|
|
||||||
|
mix.before(() => {
|
||||||
|
fs.rmSync('public/js', { recursive: true, force: true });
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
mix.sass('resources/assets/sass/app.scss', 'public/css')
|
mix.sass('resources/assets/sass/app.scss', 'public/css')
|
||||||
.sass('resources/assets/sass/appdark.scss', 'public/css')
|
.sass('resources/assets/sass/appdark.scss', 'public/css')
|
||||||
.sass('resources/assets/sass/admin.scss', 'public/css')
|
.sass('resources/assets/sass/admin.scss', 'public/css')
|
||||||
|
.sass('resources/assets/sass/portfolio.scss', 'public/css')
|
||||||
|
.sass('resources/assets/sass/spa.scss', 'public/css')
|
||||||
.sass('resources/assets/sass/landing.scss', 'public/css').version();
|
.sass('resources/assets/sass/landing.scss', 'public/css').version();
|
||||||
|
|
||||||
mix.js('resources/assets/js/app.js', 'public/js')
|
mix.js('resources/assets/js/app.js', 'public/js')
|
||||||
|
@ -16,24 +24,52 @@ mix.js('resources/assets/js/app.js', 'public/js')
|
||||||
.js('resources/assets/js/compose-classic.js', 'public/js')
|
.js('resources/assets/js/compose-classic.js', 'public/js')
|
||||||
.js('resources/assets/js/search.js', 'public/js')
|
.js('resources/assets/js/search.js', 'public/js')
|
||||||
.js('resources/assets/js/developers.js', 'public/js')
|
.js('resources/assets/js/developers.js', 'public/js')
|
||||||
.js('resources/assets/js/loops.js', 'public/js')
|
|
||||||
.js('resources/assets/js/hashtag.js', 'public/js')
|
.js('resources/assets/js/hashtag.js', 'public/js')
|
||||||
.js('resources/assets/js/collectioncompose.js', 'public/js')
|
.js('resources/assets/js/collectioncompose.js', 'public/js')
|
||||||
.js('resources/assets/js/collections.js', 'public/js')
|
.js('resources/assets/js/collections.js', 'public/js')
|
||||||
.js('resources/assets/js/profile-directory.js', 'public/js')
|
.js('resources/assets/js/profile-directory.js', 'public/js')
|
||||||
.js('resources/assets/js/story-compose.js', 'public/js')
|
.js('resources/assets/js/story-compose.js', 'public/js')
|
||||||
.js('resources/assets/js/direct.js', 'public/js')
|
.js('resources/assets/js/direct.js', 'public/js')
|
||||||
.js('resources/assets/js/admin.js', 'public/js')
|
.js('resources/assets/js/admin.js', 'public/js')
|
||||||
.js('resources/assets/js/rempro.js', 'public/js')
|
.js('resources/assets/js/spa.js', 'public/js')
|
||||||
.js('resources/assets/js/rempos.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 });
|
||||||
|
|
||||||
.extract([
|
mix.extract();
|
||||||
'lodash',
|
mix.version();
|
||||||
'popper.js',
|
|
||||||
'jquery',
|
const TerserPlugin = require('terser-webpack-plugin');
|
||||||
'axios',
|
|
||||||
'bootstrap',
|
mix.options({
|
||||||
'vue',
|
processCssUrls: false,
|
||||||
'readmore-js'
|
terser: {
|
||||||
])
|
parallel: true,
|
||||||
.version();
|
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']
|
||||||
|
});
|
||||||
|
|
Loading…
Reference in a new issue