Skip to content

Commit

Permalink
build: api demo
Browse files Browse the repository at this point in the history
  • Loading branch information
tpluscode committed Mar 25, 2024
1 parent 5d5cd27 commit 2b4ca3e
Show file tree
Hide file tree
Showing 8 changed files with 193 additions and 295 deletions.
3 changes: 1 addition & 2 deletions demos/lit-html/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
"process": "^0.11.10",
"rimraf": "^3.0.2",
"rollup-plugin-node-polyfills": "^0.2.1",
"util": "^0.12.5",
"vite": "^5.2.6"
"util": "^0.12.5"
}
}
39 changes: 3 additions & 36 deletions demos/lit-html/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,37 +1,4 @@
/* eslint-disable import/no-extraneous-dependencies */
import { defineConfig } from 'vite'
import { NodeGlobalsPolyfillPlugin } from '@esbuild-plugins/node-globals-polyfill'
import rollupNodePolyFill from 'rollup-plugin-node-polyfills'
// eslint-disable-next-line import/no-relative-packages
import config from '../../vite.config.js'

export default defineConfig({
define: {
global: 'window',
},
server: {
hmr: false,
},
resolve: {
alias: {
stream: 'readable-stream',
zlib: 'browserify-zlib',
util: 'util',
},
},
optimizeDeps: {
esbuildOptions: {
plugins: [
<any>NodeGlobalsPolyfillPlugin({
process: true,
buffer: true,
}),
],
},
},
build: {
rollupOptions: {
plugins: [
rollupNodePolyFill() as any,
],
},
},
})
export default config
Loading

0 comments on commit 2b4ca3e

Please sign in to comment.