-
Notifications
You must be signed in to change notification settings - Fork 843
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- 修改函数入口目录为entry - 分离vite编译配置 - 简化docker编译流程 - 分离next注入逻辑
- Loading branch information
Showing
23 changed files
with
928 additions
and
542 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
.git | ||
.env | ||
.DS_Store | ||
.github | ||
.vercel | ||
.wrangler | ||
dist | ||
doc | ||
node_modules | ||
plugins | ||
scripts | ||
wrangler.toml | ||
config.json |
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 |
---|---|---|
@@ -1,16 +1,8 @@ | ||
FROM node:alpine as DEV | ||
FROM node:alpine | ||
|
||
WORKDIR /app | ||
COPY package.json vite.config.ts tsconfig.json ./ | ||
COPY src ./src | ||
RUN npm install && npm run build:local | ||
|
||
FROM node:alpine as PROD | ||
|
||
WORKDIR /app | ||
COPY --from=DEV /app/dist/index.js /app/dist/index.js | ||
COPY --from=DEV /app/package.json /app/ | ||
RUN npm install --only=production --omit=dev | ||
RUN apk add --no-cache sqlite | ||
COPY package.json tsconfig.json ./ | ||
COPY src src | ||
RUN npm install | ||
EXPOSE 8787 | ||
CMD ["npm", "run", "start:dist"] | ||
CMD ["npm", "run", "start:local"] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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,32 @@ | ||
import * as path from 'node:path'; | ||
import { nodeResolve } from '@rollup/plugin-node-resolve'; | ||
import cleanup from 'rollup-plugin-cleanup'; | ||
import nodeExternals from 'rollup-plugin-node-externals'; | ||
import { defineConfig } from 'vite'; | ||
import checker from 'vite-plugin-checker'; | ||
|
||
export default defineConfig({ | ||
plugins: [ | ||
nodeResolve({ | ||
preferBuiltins: true, | ||
}), | ||
cleanup({ | ||
comments: 'none', | ||
extensions: ['js', 'ts'], | ||
}), | ||
checker({ | ||
typescript: true, | ||
}), | ||
nodeExternals(), | ||
], | ||
build: { | ||
target: 'esnext', | ||
lib: { | ||
entry: path.resolve(__dirname, '../src/plugins/interpolate.ts'), | ||
fileName: 'interpolate', | ||
formats: ['es'], | ||
}, | ||
minify: false, | ||
outDir: path.resolve(__dirname, 'dist'), | ||
}, | ||
}); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.