Test run
This commit is contained in:
parent
c453eb95fd
commit
07e1e090a1
@ -9,6 +9,15 @@
|
||||
"type": "git",
|
||||
"url": "https://github.com/arifszn/gitprofile.git"
|
||||
},
|
||||
"files": ["dist"],
|
||||
"main": "./dist/my-lib.umd.js",
|
||||
"module": "./dist/my-lib.es.js",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./dist/my-lib.es.js",
|
||||
"require": "./dist/my-lib.umd.js"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
|
||||
@ -13,6 +13,7 @@ import Project from './components/project';
|
||||
import Blog from './components/blog';
|
||||
import { getInitialTheme, setupHotjar } from './helpers/utils';
|
||||
import config from '../gitprofile.config';
|
||||
import './assets/index.css';
|
||||
|
||||
function App() {
|
||||
const [theme, setTheme] = useState(getInitialTheme());
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import './index.css';
|
||||
import App from './App';
|
||||
import { HelmetProvider } from 'react-helmet-async';
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
import postcss from './postcss.config.js';
|
||||
import path from 'path';
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
@ -11,4 +12,16 @@ export default defineConfig({
|
||||
css: {
|
||||
postcss,
|
||||
},
|
||||
build: {
|
||||
lib: {
|
||||
entry: path.resolve(__dirname, 'src/App.jsx'),
|
||||
name: 'MyLib',
|
||||
fileName: (format) => `my-lib.${format}.js`,
|
||||
},
|
||||
rollupOptions: {
|
||||
// make sure to externalize deps that shouldn't be bundled
|
||||
// into your library
|
||||
external: ['react', 'react-dom'],
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user