mirror of
https://github.com/koloml/furbooru-tagging-assistant.git
synced 2025-12-23 23:02:58 +00:00
First draft version with Svelte for popup and additional build steps
This commit is contained in:
42
svelte.config.js
Normal file
42
svelte.config.js
Normal file
@@ -0,0 +1,42 @@
|
||||
import adapter from '@sveltejs/adapter-static';
|
||||
import {vitePreprocess} from "@sveltejs/vite-plugin-svelte";
|
||||
import * as fs from "fs";
|
||||
|
||||
/** @type {import('@sveltejs/kit').Config} */
|
||||
const config = {
|
||||
kit: {
|
||||
// Can't use default _app, since "_" is reserved symbol in Chrome
|
||||
appDir: "assets/popup",
|
||||
adapter: adapter({
|
||||
strict: false
|
||||
}),
|
||||
version: {
|
||||
name: Date.now().toString(36)
|
||||
},
|
||||
alias: {
|
||||
"$components": "./src/components",
|
||||
"$styles": "./src/styles",
|
||||
"$stores": "./src/stores",
|
||||
"$entities": "./src/lib/api/entities",
|
||||
},
|
||||
},
|
||||
preprocess: [
|
||||
vitePreprocess({
|
||||
// SCSS is used by the project
|
||||
style: {
|
||||
postcss: true
|
||||
}
|
||||
})
|
||||
]
|
||||
};
|
||||
|
||||
// Providing the version from package.json for rendering it in the UI.
|
||||
if (fs.existsSync('package.json')) {
|
||||
const packageInformation = JSON.parse(
|
||||
fs.readFileSync('package.json', 'utf8')
|
||||
);
|
||||
|
||||
config.kit.version.name = packageInformation.version;
|
||||
}
|
||||
|
||||
export default config;
|
||||
Reference in New Issue
Block a user