chore(deps): Aggiunto pacchetto per configurazione Vite

La configurazione di Vite ora è importata da un pacchetto creato ad-hoc
This commit is contained in:
Maicol Battistini 2021-09-08 16:17:26 +02:00
parent b1d22af347
commit 4bafd23a55
No known key found for this signature in database
GPG Key ID: 4FDB0F87CDB1D34A
2 changed files with 5 additions and 41 deletions

View File

@ -57,6 +57,7 @@
"@babel/preset-flow": "^7.14.5",
"@bunchtogether/vite-plugin-flow": "github:maicol07/vite-plugin-flow",
"@open-wc/eslint-config": "^4.3.0",
"@openstamanager/vite-config": "github:maicol07/openstamanager-vite-config",
"concurrently": "^6.2.1",
"eslint": "^7.32.0",
"eslint-config-airbnb-base": "^14.2.1",

45
vite.config.js vendored
View File

@ -1,9 +1,8 @@
import { esbuildFlowPlugin, flowPlugin } from '@bunchtogether/vite-plugin-flow';
import osmConfig from '@openstamanager/vite-config';
import { defineConfig } from 'laravel-vite';
// import ViteFonts from 'vite-plugin-fonts';
export default defineConfig({
assetsInclude: ['js', 'png'],
export default defineConfig(osmConfig({
/* NOT WORKING: waiting a fix
css: {
preprocessorOptions: {
@ -12,46 +11,10 @@ export default defineConfig({
},
},
}, */
build: {
minify: false,
rollupOptions: {
manualChunks: {},
output: {
entryFileNames: '[name].js',
chunkFileNames: '[name].js',
assetFileNames: '[name].[ext]'
},
preserveEntrySignatures: 'allow-extension'
}
},
esbuild: {
jsxFactory: 'm',
jsxFragment: 'm.Fragment'
},
optimizeDeps: {
esbuildOptions: {
plugins: [esbuildFlowPlugin(/\.(flow|jsx?)$/, path => (/\.jsx$/.test(path) ? 'jsx' : 'js'), {
all: true,
pretty: true,
ignoreUninitializedFields: false
})]
}
},
plugins: [
flowPlugin({
include: /\.(flow|jsx?)$/,
exclude: /node_modules/,
flow: {
all: true,
pretty: true,
ignoreUninitializedFields: false
}
})
/* NOT WORKING. Waiting a fix
/* NOT WORKING. Waiting a fix
ViteFonts({
google: {
families: ['Montserrat', 'Nunito']
}
}) */
]
});
}));