Skip to content

Commit

Permalink
Update vite.config.mts
Browse files Browse the repository at this point in the history
  • Loading branch information
thednp committed Sep 19, 2024
1 parent fc0f7cf commit 071eb27
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions vite.config.mts
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
/// <reference types="vite/client" />
"use strict";
import { resolve } from 'node:path';
import { defineConfig } from 'vite';
import { name } from './package.json';

const getPackageName = () => {
return name.includes('@') ? name.split('/')[1] : name;
};

const NAME = 'ColorPicker';

const fileName = {
es: `${getPackageName()}.mjs`,
cjs: `${getPackageName()}.cjs`,
iife: `${getPackageName()}.js`,
es: `color-picker.mjs`,
cjs: `color-picker.cjs`,
iife: `color-picker.js`,
};

export default defineConfig({
Expand Down

0 comments on commit 071eb27

Please sign in to comment.