mirror of
https://github.com/nocobase/nocobase
synced 2024-11-16 00:29:40 +00:00
fix: build bug
This commit is contained in:
parent
918087f055
commit
2904a339fd
@ -15,7 +15,7 @@ RUN cd /tmp && \
|
||||
NEWVERSION="$(cat lerna.json | jq '.version' | tr -d '"').$(date +'%Y%m%d%H%M%S')" \
|
||||
&& tmp=$(mktemp) \
|
||||
&& jq ".version = \"${NEWVERSION}\"" lerna.json > "$tmp" && mv "$tmp" lerna.json
|
||||
RUN yarn install && yarn build --no-dts --sourcemap --development
|
||||
RUN yarn install && yarn build --no-dts --development
|
||||
|
||||
RUN git checkout -b release-$(date +'%Y%m%d%H%M%S') \
|
||||
&& yarn version:alpha -y
|
||||
|
@ -18,7 +18,7 @@ indexGenerator.generate();
|
||||
|
||||
export default defineConfig({
|
||||
title: 'Loading...',
|
||||
devtool: process.env['sourcemap'] ? 'source-map' : false,
|
||||
devtool: process.env.NODE_ENV === 'development' ? 'source-map' : false,
|
||||
favicons: ['/favicon/favicon.ico'],
|
||||
metas: [{ name: 'viewport', content: 'initial-scale=0.1' }],
|
||||
links: [
|
||||
|
@ -39,7 +39,7 @@ export function buildEsm(cwd: string, userConfig: UserConfig, sourcemap: boolean
|
||||
'process.env.__E2E__': process.env.__E2E__ ? true : false,
|
||||
},
|
||||
build: {
|
||||
minify: false,
|
||||
minify: process.env.NODE_ENV === 'production',
|
||||
outDir,
|
||||
cssCodeSplit: true,
|
||||
emptyOutDir: true,
|
||||
@ -78,13 +78,13 @@ export async function buildLib(
|
||||
|
||||
await viteBuild(
|
||||
userConfig.modifyViteConfig({
|
||||
mode: 'production',
|
||||
mode: process.env.NODE_ENV || 'production',
|
||||
esbuild: {
|
||||
format: 'cjs',
|
||||
},
|
||||
build: {
|
||||
outDir,
|
||||
minify: false,
|
||||
minify: process.env.NODE_ENV === 'production',
|
||||
sourcemap,
|
||||
lib: {
|
||||
entry: path.join(cwd, 'es/index.ts'),
|
||||
|
@ -318,7 +318,7 @@ export async function buildPluginClient(cwd: string, userConfig: UserConfig, sou
|
||||
},
|
||||
logLevel: 'warn',
|
||||
build: {
|
||||
minify: sourcemap,
|
||||
minify: process.env.NODE_ENV === 'production',
|
||||
outDir,
|
||||
cssCodeSplit: false,
|
||||
emptyOutDir: true,
|
||||
|
Loading…
Reference in New Issue
Block a user