mirror of
https://gitlab.com/Cha_deL/peertubeify
synced 2024-12-30 16:27:20 +01:00
Enable webpack code splitting to drastically reduce package size
4x lodash was a bit too much, I think.
This commit is contained in:
parent
f197253e52
commit
8602c34825
@ -15,14 +15,14 @@
|
||||
"<all_urls>"
|
||||
],
|
||||
"background": {
|
||||
"scripts": ["dist/background.js"]
|
||||
"scripts": ["dist/background.js", "dist/vendors.js"]
|
||||
},
|
||||
"content_scripts": [{
|
||||
"matches": ["*://*.youtube.com/*"],
|
||||
"js": ["dist/youtube.js"]
|
||||
"js": ["dist/youtube.js", "dist/vendors.js"]
|
||||
}, {
|
||||
"matches": ["https://*/videos/watch/*"],
|
||||
"js": ["dist/peertube.js"]
|
||||
"js": ["dist/peertube.js", "dist/vendors.js"]
|
||||
}],
|
||||
"options_ui": {
|
||||
"page": "dist/options.html"
|
||||
|
@ -32,6 +32,7 @@
|
||||
<button style="display: block; margin-left: auto" type="submit">Save</button>
|
||||
</form>
|
||||
|
||||
<script src="vendors.js"></script>
|
||||
<script src="options.js"></script>
|
||||
</body>
|
||||
|
||||
|
@ -8,6 +8,12 @@ module.exports = {
|
||||
peertube: 'peertube.ts',
|
||||
options: ['options.ts', 'options.html'],
|
||||
},
|
||||
optimization: {
|
||||
splitChunks: {
|
||||
chunks: 'all',
|
||||
name: 'vendors'
|
||||
}
|
||||
},
|
||||
output: {
|
||||
path: path.join(__dirname, 'extension', 'dist'),
|
||||
filename: '[name].js',
|
||||
|
Loading…
Reference in New Issue
Block a user