lightened up notification utils by remove store stuff from it

This commit is contained in:
Henry Jameson 2026-06-02 23:53:11 +03:00
commit a31e6f660a
6 changed files with 13 additions and 14 deletions

View file

@ -1,7 +1,6 @@
import { readFile } from 'node:fs/promises'
import { dirname, resolve } from 'node:path'
import { fileURLToPath } from 'node:url'
import * as esbuild from 'esbuild'
import { build } from 'vite'
import {
@ -23,10 +22,6 @@ const getProdSwEnv = ({ assets }) =>
export const devSwPlugin = ({ swSrc, swDest, transformSW, alias }) => {
const swFullSrc = resolve(projectRoot, swSrc)
const esbuildAlias = {}
Object.entries(alias).forEach(([source, dest]) => {
esbuildAlias[source] = dest.startsWith('/') ? projectRoot + dest : dest
})
return {
name: 'dev-sw-plugin',
@ -58,12 +53,11 @@ export const devSwPlugin = ({ swSrc, swDest, transformSW, alias }) => {
*/
async transform(code, id) {
if (id === swFullSrc && transformSW) {
const res = await esbuild.build({
const res = await build({
entryPoints: [swSrc],
bundle: true,
write: false,
outfile: 'sw-pleroma.js',
alias: esbuildAlias,
plugins: [
{
name: 'vite-like-root-resolve',
@ -140,7 +134,7 @@ export const buildSwPlugin = ({ swSrc, swDest }) => {
formats: ['iife'],
name: 'sw_pleroma',
},
emptyOutDir: false,
emptyOutDir: true,
rolldownOptions: {
output: {
entryFileNames: swDest,