Skip to content

Commit

Permalink
chore: Update npm dependency to latest stable version
Browse files Browse the repository at this point in the history
  • Loading branch information
kanakkholwal committed Jun 19, 2024
1 parent f4f2c7f commit f4e61f9
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 42 deletions.
22 changes: 5 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
{
"name": "nexo-mdx",
"version": "0.7.3",
"version": "0.7.4",
"type": "module",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"files": [
"dist"
],
"homepage": "https://github.com/kanakkholwal/nexo-mdx#readme",
"repository": "https://github.com/kanakkholwal/nexo-mdx",
"bugs": "https://github.com/kanakkholwal/nexo-mdx/issues",
Expand All @@ -29,19 +25,10 @@
"nexo-mdx package",
"React MDX editor"
],
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.js",
"types": "./dist/index.d.ts"
},
"./types": {
"types": "./dist/types.d.ts"
}
},
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"build": "tsc --p ./tsconfig-build.json && vite build",
"prepublishOnly": "npm run build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
},
Expand Down Expand Up @@ -83,7 +70,8 @@
"terser": "^5.31.1",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.2.2",
"vite": "^5.2.0"
"vite": "^5.2.0",
"vite-plugin-lib-inject-css": "^2.1.1"
},
"peerDependencies": {
"react": "^18.2.0",
Expand Down
4 changes: 4 additions & 0 deletions tsconfig-build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "./tsconfig.json",
"include": ["src"]
}
1 change: 0 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
"include": [
"src/**/*.ts",
"src/**/*.tsx",

],
"exclude": [
"node_modules",
Expand Down
11 changes: 0 additions & 11 deletions tsconfig.node.json

This file was deleted.

26 changes: 13 additions & 13 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@ import react from '@vitejs/plugin-react-swc';
import * as path from 'path';
import { defineConfig } from "vite";
import dts from 'vite-plugin-dts';

import { libInjectCss } from 'vite-plugin-lib-inject-css'
export default defineConfig({
plugins: [
react(),
libInjectCss(),
dts({
insertTypesEntry: true,
copyDtsFiles: true,
tsconfigPath: './tsconfig.json',
}),],

insertTypesEntry: true,
copyDtsFiles: true,
tsconfigPath: './tsconfig.json',
}),],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
Expand All @@ -20,20 +22,18 @@ export default defineConfig({
},
},
build: {
copyPublicDir: false,
lib: {
entry: path.resolve(__dirname, 'src/index.ts'),
name: 'NexoMdx',
fileName: (format) => `nexo-mdx.${format}.js`,
formats: ['es']
},
rollupOptions: {
external: ['react', 'react-dom'],
external: ['react', 'react-dom', 'react/jsx-runtime'],
output: {
globals: {
react: 'React',
'react-dom': 'ReactDOM',
},
exports: 'named'
},
assetFileNames: 'assets/[name][extname]',
entryFileNames: '[name].js',
}
},
minify: 'terser', // Use Terser for minification
}
Expand Down

0 comments on commit f4e61f9

Please sign in to comment.