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'] } }) */ - ] -}); +}));