diff --git a/.gitignore b/.gitignore index 68c3352f..e68bfaab 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ npm-debug.log* yarn-debug.log* yarn-error.log* storybook-static +dist-vite diff --git a/index.html b/index.html index ff872cac..4b117773 100644 --- a/index.html +++ b/index.html @@ -18,7 +18,7 @@ typescript & jsx than babel+typescript, which we're required to use to get our bundled assets working properly for explore.ipld.io --> - + diff --git a/vite.config.ts b/vite.config.ts index ea225752..d462cf8b 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -69,33 +69,34 @@ export default defineConfig(({ mode, command }) => { include: /\.(tsx?|jsx?)$/ } const viteBuild: UserConfig['build'] = { - lib: { - entry: [ - pathResolve(__dirname, 'src/index.js') - ], - fileName: (format, entryName) => `${format}/${entryName}.js`, - formats: ['es'] - }, + // lib: { + // entry: [ + // pathResolve(__dirname, 'src/index.js') + // ], + // fileName: (format, entryName) => `${format}/${entryName}.js`, + // formats: ['es'] + // }, outDir: 'dist-vite', target: 'esnext', - minify: false, - cssCodeSplit: false, + // minify: false, + // cssCodeSplit: false, rollupOptions: { external: [ /node_modules/, /\.stories\..+$/ - ], - preserveEntrySignatures: 'strict', - input: { - index: pathResolve(__dirname, 'src/index.js') - }, - output: { - preserveModules: true, - preserveModulesRoot: 'src', - entryFileNames: '[name].js' - }, - plugins: [ ] + // preserveEntrySignatures: 'strict', + // input: { + // // index: pathResolve(__dirname, 'dev/devPage.jsx') + // index: pathResolve(__dirname, 'index.html') + // }, + // output: { + // preserveModules: true, + // preserveModulesRoot: 'src', + // entryFileNames: '[name].js' + // }, + // plugins: [ + // ] } } @@ -116,6 +117,7 @@ export default defineConfig(({ mode, command }) => { } const finalConfig: UserConfigExport = { + base: './', plugins: vitePlugins, resolve: viteResolve, define: viteDefine,