Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
funkwhale
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Creak
funkwhale
Commits
ebb3d7de
Verified
Commit
ebb3d7de
authored
3 years ago
by
Georg Krause
Browse files
Options
Downloads
Patches
Plain Diff
Remove vue cli config
parent
06f636fe
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
front/vue.config.js
+0
-164
0 additions, 164 deletions
front/vue.config.js
with
0 additions
and
164 deletions
front/vue.config.js
deleted
100644 → 0
+
0
−
164
View file @
06f636fe
const
baseUrl
=
process
.
env
.
BASE_URL
||
'
/front/
'
const
BundleAnalyzerPlugin
=
require
(
'
webpack-bundle-analyzer
'
).
BundleAnalyzerPlugin
;
const
webpack
=
require
(
'
webpack
'
);
const
PreloadWebpackPlugin
=
require
(
'
preload-webpack-plugin
'
);
let
plugins
=
[
// do not include moment.js locales since it's quite heavy
new
webpack
.
IgnorePlugin
({
resourceRegExp
:
/^
\.\/
locale$/
,
contextRegExp
:
/moment$/
}),
new
PreloadWebpackPlugin
({
rel
:
'
preload
'
,
include
:
[
'
audio
'
,
'
core
'
,
'
about
'
]
}),
]
if
(
process
.
env
.
BUNDLE_ANALYZE
===
'
1
'
)
{
plugins
.
push
(
new
BundleAnalyzerPlugin
())
}
// Disabled because it causes some issues, like #1032, since some useful rules are still
// removed, and we cannot detect this during development
// plugins.push(
// new PurgecssPlugin({
// paths: glob.sync([
// path.join(__dirname, './public/index.html'),
// path.join(__dirname, './public/embed.html'),
// path.join(__dirname, './**/*.vue'),
// path.join(__dirname, './src/**/*.js')
// ]),
// whitelist: ['scale'],
// whitelistPatterns: [/plyr/, /toast/, /transition/, /visible/],
// whitelistPatternsChildren: [/plyr/, /dropdown/, /upward/]
// }),
// )
module
.
exports
=
{
publicPath
:
baseUrl
,
productionSourceMap
:
false
,
// Add settings for manifest file
pwa
:
{
name
:
'
Funkwhale
'
,
themeColor
:
'
#f2711c
'
,
msTileColor
:
'
#000000
'
,
appleMobileWebAppCapable
:
'
yes
'
,
appleMobileWebAppStatusBarStyle
:
'
black
'
,
workboxPluginMode
:
'
InjectManifest
'
,
manifestOptions
:
{
display
:
'
standalone
'
,
start_url
:
'
.
'
,
description
:
'
A social platform to enjoy and share music
'
,
scope
:
"
/
"
,
categories
:
[
"
music
"
],
icons
:
[
{
'
src
'
:
baseUrl
+
'
favicon.png
'
,
'
sizes
'
:
'
192x192
'
,
'
type
'
:
'
image/png
'
},
{
'
src
'
:
baseUrl
+
'
favicon.png
'
,
'
sizes
'
:
'
512x512
'
,
'
type
'
:
'
image/png
'
},
]
},
workboxOptions
:
{
importWorkboxFrom
:
'
local
'
,
// swSrc is required in InjectManifest mode.
swSrc
:
'
src/service-worker.js
'
,
swDest
:
'
service-worker.js
'
,
exclude
:
[
new
RegExp
(
'
js/locale.*
'
),
new
RegExp
(
'
js/moment-locale.*
'
),
new
RegExp
(
'
js/admin.*
'
),
new
RegExp
(
'
css/admin.*
'
),
]
},
iconPaths
:
{
favicon32
:
'
favicon.png
'
,
favicon16
:
'
favicon.png
'
,
appleTouchIcon
:
'
favicon.png
'
,
maskIcon
:
'
favicon.png
'
,
msTileImage
:
'
favicon.png
'
}
},
pages
:
{
embed
:
{
entry
:
'
src/embed.js
'
,
template
:
'
public/embed.html
'
,
filename
:
'
embed.html
'
,
chunks
:
[
'
chunk-vendors
'
,
'
chunk-common
'
,
'
chunk-embed-vendors
'
,
'
embed
'
]
},
index
:
{
entry
:
'
src/main.js
'
,
template
:
'
public/index.html
'
,
filename
:
'
index.html
'
,
chunks
:
[
'
chunk-vendors
'
,
'
chunk-common
'
,
'
chunk-index-vendors
'
,
'
index
'
]
}
},
chainWebpack
:
config
=>
{
// config.plugins.delete('prefetch-embed')
// config.plugins.delete('preload-embed')
// config.plugins.delete('prefetch-index')
// TODO: Remove this workaround once https://github.com/vuejs/vue-cli/issues/2463 is fixed
// Remove preload plugins for multi-page build to prevent infinite recursion
[
'
embed
'
,
'
index
'
].
forEach
(
page
=>
{
config
.
plugins
.
delete
(
`preload-
${
page
}
`
)
config
.
plugins
.
delete
(
`prefetch-
${
page
}
`
)
})
// needed to avoid having big dependedncies included in our lightweight
// embed.html, cf https://github.com/vuejs/vue-cli/issues/2381
const
options
=
module
.
exports
const
pages
=
options
.
pages
const
pageKeys
=
Object
.
keys
(
pages
)
// Long-term caching
const
IS_VENDOR
=
/
[\\/]
node_modules
[\\/]
/
config
.
optimization
.
splitChunks
({
cacheGroups
:
{
vendors
:
{
name
:
'
chunk-vendors
'
,
priority
:
-
10
,
chunks
:
'
initial
'
,
minChunks
:
2
,
test
:
IS_VENDOR
,
enforce
:
true
,
},
...
pageKeys
.
map
(
key
=>
({
name
:
`chunk-
${
key
}
-vendors`
,
priority
:
-
11
,
chunks
:
chunk
=>
chunk
.
name
===
key
,
test
:
IS_VENDOR
,
enforce
:
true
,
})),
common
:
{
name
:
'
chunk-common
'
,
priority
:
-
20
,
chunks
:
'
initial
'
,
minChunks
:
2
,
reuseExistingChunk
:
true
,
enforce
:
true
,
},
},
})
},
configureWebpack
:
{
plugins
:
plugins
,
devtool
:
false
},
devServer
:
{
disableHostCheck
:
true
,
// use https://node1.funkwhale.test/front-server/ if you use docker with federation
public
:
process
.
env
.
FRONT_DEVSERVER_URL
||
(
'
http://localhost:
'
+
(
process
.
env
.
VUE_PORT
||
'
8080
'
))
},
css
:
{
loaderOptions
:
{
sass
:
{
implementation
:
require
(
'
sass
'
)
}
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment