feat: Contentstack <-> ImageVault integration
This commit is contained in:
28
rte/vite.config.ts
Normal file
28
rte/vite.config.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { resolve } from 'path';
|
||||
import { defineConfig } from 'vite';
|
||||
import tsconfigPaths from 'vite-tsconfig-paths';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [tsconfigPaths()],
|
||||
define: {
|
||||
IS_DEV: process.env.IS_DEV === 'true' ? true : false,
|
||||
},
|
||||
publicDir: false,
|
||||
build: {
|
||||
sourcemap: process.env.IS_DEV ? 'inline' : 'hidden',
|
||||
emptyOutDir: true,
|
||||
lib: {
|
||||
entry: resolve(__dirname, 'main.tsx'),
|
||||
name: 'csiv',
|
||||
fileName: () => (process.env.IS_DEV ? 'csiv.js' : 'csiv-[hash].js'),
|
||||
// @ts-expect-error: 'system' not valid by typings, but works with Rollup
|
||||
formats: ['system'],
|
||||
},
|
||||
rollupOptions: {
|
||||
external: ['react', 'react-dom', '@contentstack/venus-components'],
|
||||
output: {
|
||||
dir: '../remix/public/build/rte',
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user