Skip to content

Commit

Permalink
maybe relative?
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianvasquez committed Dec 26, 2024
1 parent 1990167 commit f751ebd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 26 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ <h1>Display a Supernote File</h1>
class SupernoteWorker {
constructor () {
this.worker = new Worker(
new URL('src/worker.js?v=' + Date.now(), import.meta.url),
new URL('./src/worker.js?v=' + Date.now(), import.meta.url),
{ type: 'module' },
)
}
Expand Down
34 changes: 9 additions & 25 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,9 @@
import { defineConfig } from 'vite'
import { nodePolyfills } from 'vite-plugin-node-polyfills'

export default defineConfig({
base: './', // Ensure assets use relative paths
// server: {
// proxy: {
// '/sparql': {
// target: 'https://endpoint-with-cors/sparql',
// changeOrigin: true,
// secure: false,
// rewrite: (path) => path.replace(/^\/sparql/, '')
// },
// },
// },
plugins: [
nodePolyfills({
include: ['path', 'stream', 'util'], exclude: ['http'], globals: {
Buffer: true, global: true, process: true,
}, overrides: {
fs: 'memfs',
}, protocolImports: true,
})],
})

export default {
base: './',
worker: {
format: 'es',
},
define: {
'global': {},
},
}

0 comments on commit f751ebd

Please sign in to comment.