-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'pnpm-clean' into bun-sh
- Loading branch information
Showing
4 changed files
with
599 additions
and
775 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,11 +3,11 @@ | |
"version": "4.0.0", | ||
"private": true, | ||
"scripts": { | ||
"build": "webpack", | ||
"build:bun-node": "bun build ./src --outdir=lib --minify --target=node", | ||
"build:bun": "bun build ./src --outdir=lib --minify --target=bun", | ||
"build": "vite build", | ||
"start": "http-server -p 8000 -s index.html", | ||
"lint": "eslint --ext .js,.ts src" | ||
"lint": "eslint --ext .js,.ts src", | ||
"serve": "vite", | ||
"preview": "vite preview" | ||
}, | ||
"author": "Akira Fukushima <[email protected]> (https://github.com/h3poteto)", | ||
"license": "MIT", | ||
|
@@ -29,7 +29,9 @@ | |
"ts-loader": "^9.4.4", | ||
"typescript": "5.2.2", | ||
"url": "^0.11.3", | ||
"webpack": "^5.88.2", | ||
"webpack-cli": "^5.1.4" | ||
"vite-plugin-env-compatible": "^1.1.1", | ||
"vite-plugin-html": "3.2.0", | ||
"vite": "^2.7.2", | ||
"@originjs/vite-plugin-commonjs": "^1.0.1" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { defineConfig } from 'vite'; | ||
import path from 'path'; | ||
import envCompatible from 'vite-plugin-env-compatible'; | ||
import { createHtmlPlugin } from 'vite-plugin-html'; | ||
import { viteCommonjs } from '@originjs/vite-plugin-commonjs'; | ||
|
||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
resolve: { | ||
alias: [ | ||
{ | ||
find: /^~/, | ||
replacement: '' | ||
}, | ||
{ | ||
find: '@', | ||
replacement: path.resolve(__dirname, 'src') | ||
} | ||
], | ||
extensions: [ | ||
'.mjs', | ||
'.js', | ||
'.ts', | ||
'.jsx', | ||
'.tsx', | ||
'.json', | ||
'.vue' | ||
] | ||
}, | ||
plugins: [ | ||
viteCommonjs(), | ||
envCompatible(), | ||
createHtmlPlugin({ | ||
inject: { | ||
data: { | ||
title: 'browser' | ||
} | ||
} | ||
}) | ||
], | ||
build: {} | ||
}) |
Oops, something went wrong.