From 4bafd23a55eb9a75e2682ce3679cbce118cf85d7 Mon Sep 17 00:00:00 2001 From: Maicol Battistini Date: Wed, 8 Sep 2021 16:17:26 +0200 Subject: [PATCH] =?UTF-8?q?chore(deps):=20=E2=9E=95=20Aggiunto=20pacchetto?= =?UTF-8?q?=20per=20configurazione=20Vite?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit La configurazione di Vite ora รจ importata da un pacchetto creato ad-hoc --- package.json | 1 + vite.config.js | 45 ++++----------------------------------------- 2 files changed, 5 insertions(+), 41 deletions(-) diff --git a/package.json b/package.json index 2e977c9f6..9464cdf7f 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/vite.config.js b/vite.config.js index b1b630d6a..20c857704 100644 --- a/vite.config.js +++ b/vite.config.js @@ -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'] } }) */ - ] -}); +}));