Skip to content

Commit

Permalink
fix: use farm-tailwind
Browse files Browse the repository at this point in the history
  • Loading branch information
JellyBrick committed Jan 11, 2025
1 parent 6ace214 commit 10bbc29
Show file tree
Hide file tree
Showing 4 changed files with 605 additions and 12 deletions.
4 changes: 2 additions & 2 deletions farm.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import path from 'node:path';

import { defineConfig } from '@farmfe/core';
import farmPluginPostcss from '@farmfe/js-plugin-postcss';
import tailwind from '@farmfe/js-plugin-tailwindcss';
import electron from '@farmfe/js-plugin-electron';

import solid from 'vite-plugin-solid';
Expand Down Expand Up @@ -69,6 +69,6 @@ export default defineConfig({
},
},
}),
farmPluginPostcss(),
tailwind(),
],
});
74 changes: 74 additions & 0 deletions farm.config.ts.save
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
import path from 'node:path';

import { defineConfig } from '@farmfe/core';
import tailwind from '@farmfe/js-plugin-tailwindcss';
import electron from '@farmfe/js-plugin-electron';

import solid from 'vite-plugin-solid';

export default defineConfig({
compilation: {
input: {
main: path.join(__dirname, './renderer/index.html'),
settings: path.join(__dirname, './renderer/settings.html'),
lyrics: path.join(__dirname, './renderer/lyrics.html'),
tray: path.join(__dirname, './renderer/tray.html'),
},
output: {
targetEnv: 'browser-esnext',
path: 'dist',
publicPath: './',
},
},
vitePlugins: [
() => ({
vitePlugin: solid(),
filters: ['\\.tsx$', '\\.jsx$']
})
],
plugins: [
electron({
main: {
input: './index.ts',
farm: {
compilation: {
externalNodeBuiltins: true,
external: [
'^electron$',
'^@alexssmusica/ffi-napi$',
'^@alexssmusica/ref-napi$',
'^@jellybrick/wql-process-monitor$',
'^mica-electron$',
'^glasstron$',
'^hmc-win32$',
'^extract-file-icon$',
'^node-window-manager$'
],
output: {
targetEnv: 'node-next',
path: 'dist',
},
},
},
},
preload: {
input: './src/preload.ts',
farm: {
compilation: {
externalNodeBuiltins: true,
external: [
'^electron$',
'^hmc-win32$',
'^font-list$',
],
output: {
targetEnv: 'node-next',
path: 'dist',
},
},
},
},
}),
farmPluginPostcs(),
],
});
Loading

0 comments on commit 10bbc29

Please sign in to comment.