Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
web/satellite: update Vuetify proof of concept
The changes as of storj/vuetify-storj@c801fe6 have been pulled into the Vuetify proof of concept. Change-Id: I3db208836cff21287052615d36258fcf2d4c6169
- Loading branch information
Showing
94 changed files
with
4,633 additions
and
1,111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,85 +1,55 @@ | ||
// Copyright (C) 2023 Storj Labs, Inc. | ||
// See LICENSE for copying information. | ||
|
||
import { resolve } from 'path'; | ||
// Plugins | ||
import vue from '@vitejs/plugin-vue' | ||
import vuetify, { transformAssetUrls } from 'vite-plugin-vuetify' | ||
|
||
import { defineConfig } from 'vite'; | ||
import { visualizer } from 'rollup-plugin-visualizer'; | ||
import vue from '@vitejs/plugin-vue'; | ||
import viteCompression from 'vite-plugin-compression'; | ||
import vitePluginRequire from 'vite-plugin-require'; | ||
import svgLoader from 'vite-svg-loader'; | ||
import vuetify, { transformAssetUrls } from 'vite-plugin-vuetify'; | ||
// Utilities | ||
import { defineConfig } from 'vite' | ||
import { fileURLToPath, URL } from 'node:url' | ||
|
||
const productionBrotliExtensions = ['js', 'css', 'ttf', 'woff', 'woff2']; | ||
|
||
const plugins = [ | ||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
base: '/static/dist_vuetify_poc', | ||
plugins: [ | ||
vue({ | ||
template: { transformAssetUrls } | ||
}), | ||
svgLoader({ | ||
svgoConfig: { | ||
plugins: [{ name: 'removeViewBox', fn: () => {} }], | ||
}, | ||
template: { transformAssetUrls } | ||
}), | ||
vitePluginRequire(), | ||
// https://github.com/vuetifyjs/vuetify-loader/tree/next/packages/vite-plugin | ||
vuetify({ | ||
autoImport: true, | ||
styles: { | ||
configFile: 'vuetify-poc/src/styles/settings.scss', | ||
}, | ||
autoImport: true, | ||
styles: { | ||
configFile: 'vuetify-poc/src/styles/settings.scss', | ||
}, | ||
}), | ||
]; | ||
|
||
if (process.env.NODE_ENV === 'production') { | ||
plugins.push(viteCompression({ | ||
algorithm: 'brotliCompress', | ||
threshold: 1024, | ||
ext: '.br', | ||
filter: new RegExp('\\.(' + productionBrotliExtensions.join('|') + ')$'), | ||
})); | ||
} | ||
|
||
if (process.env['STORJ_DEBUG_BUNDLE_SIZE']) { | ||
plugins.push(visualizer({ | ||
open: true, | ||
brotliSize: true, | ||
filename: 'analyse.html', // will be saved in project's root | ||
})); | ||
} | ||
|
||
export default defineConfig(() => { | ||
return { | ||
base: '/static/dist_vuetify_poc', | ||
plugins, | ||
resolve: { | ||
alias: { | ||
'@': resolve(__dirname, './src'), | ||
'@poc': resolve(__dirname, './vuetify-poc/src'), | ||
'stream': 'stream-browserify', | ||
'util': 'util/', | ||
}, | ||
extensions: ['.js', '.ts', '.svg', '.vue', '.mjs'], | ||
}, | ||
build: { | ||
outDir: resolve(__dirname, 'dist_vuetify_poc'), | ||
emptyOutDir: true, | ||
rollupOptions: { | ||
input: { | ||
'vuetify-poc': resolve(__dirname, './index-vuetify.html'), | ||
}, | ||
external: [ | ||
/satellite\/src\/views/, | ||
/satellite\/src\/components/, | ||
/satellite\/src\/router/, | ||
], | ||
}, | ||
}, | ||
optimizeDeps: { | ||
exclude: ['* > vuetify/lib/components'], | ||
}, | ||
define: { | ||
'process.env': {}, | ||
}, | ||
}; | ||
}); | ||
], | ||
define: { 'process.env': {} }, | ||
resolve: { | ||
alias: { | ||
'@': fileURLToPath(new URL('./src', import.meta.url)), | ||
'@poc': fileURLToPath(new URL('./vuetify-poc/src', import.meta.url)), | ||
}, | ||
extensions: [ | ||
'.js', | ||
'.json', | ||
'.jsx', | ||
'.mjs', | ||
'.ts', | ||
'.tsx', | ||
'.vue', | ||
], | ||
}, | ||
build: { | ||
outDir: fileURLToPath(new URL('dist_vuetify_poc', import.meta.url)), | ||
emptyOutDir: true, | ||
rollupOptions: { | ||
input: { | ||
'vuetify-poc': fileURLToPath(new URL('./index-vuetify.html', import.meta.url)), | ||
}, | ||
}, | ||
}, | ||
server: { | ||
port: 3000, | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.