- Updated the PVC models in the database and adjusted the tests accordingly to reflect the new model counts and codes. - Removed deprecated models from the JSON data for PVC systems. - Added new GLB models for "scorrevole_sf_3_ante" and "scorrevole_sf_4_ante". - Enhanced the development scripts to streamline the build process for both frontends. - Updated documentation to reflect changes in the development environment and deployment process. - Improved the styling of texture radio options for better visibility. - Fixed URL handling in the configurator to ensure proper routing and API calls.
51 lines
1.4 KiB
JavaScript
51 lines
1.4 KiB
JavaScript
import { defineConfig } from 'vite';
|
|
import path from 'path';
|
|
import { viteStaticCopy } from 'vite-plugin-static-copy';
|
|
import { ViteMinifyPlugin } from 'vite-plugin-minify'
|
|
|
|
export default defineConfig({
|
|
// Il configuratore è servito da Laravel sotto /configuratore/ (stessa origine dell'API):
|
|
// la build finisce direttamente in backoffice/public/configuratore.
|
|
base: '/configuratore/',
|
|
root: 'src',
|
|
// root è 'src', ma i file .env/.env.production vivono nella root del repo (accanto a build.sh).
|
|
envDir: path.resolve(__dirname),
|
|
build: {
|
|
outDir: path.resolve(__dirname, 'backoffice/public/configuratore'),
|
|
minify: true,
|
|
cssMinify: true,
|
|
|
|
emptyOutDir: true,
|
|
rollupOptions: {
|
|
input: {
|
|
main: path.resolve(__dirname, 'src/index.html')
|
|
}
|
|
},
|
|
},
|
|
plugins: [
|
|
viteStaticCopy({
|
|
targets: [
|
|
{
|
|
src: 'assets',
|
|
dest: ''
|
|
}
|
|
]
|
|
}),
|
|
ViteMinifyPlugin({
|
|
minify: {
|
|
removeComments: true,
|
|
collapseWhitespace: true,
|
|
minifyCSS: true,
|
|
minifyJS: true,
|
|
minifyURLs: true
|
|
}
|
|
})
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
'three': path.resolve(__dirname, 'node_modules/three'),
|
|
'@': path.resolve(__dirname, 'src')
|
|
}
|
|
}
|
|
});
|