Skip to content
Open
3 changes: 2 additions & 1 deletion packages/i18n/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"scripts": {
"clean": "rimraf ./dist",
"build:dev": "pnpm clean && tsc -p tsconfig.json",
"build:dev": "pnpm clean && tsc -p tsconfig.json && vite build",
"build:prod": "pnpm run build:dev && pnpm test",
"test": "vitest run --passWithNoTests"
},
Expand All @@ -28,6 +28,7 @@
"@types/react-dom": "catalog:",
"rimraf": "catalog:",
"typescript": "catalog:",
"vite": "catalog:",
"vitest": "catalog:"
},
"peerDependencies": {
Expand Down
4 changes: 3 additions & 1 deletion packages/i18n/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
"compilerOptions": {
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"sourceMap": false,
"emitDeclarationOnly": true,
"noEmitOnError": true,
"rootDir": "./src",
"outDir": "./dist"
},
Expand Down
35 changes: 35 additions & 0 deletions packages/i18n/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* Copyright 2021-Present The Serverless Workflow Specification Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import { defineConfig } from "vite";

export default defineConfig({
resolve: {
tsconfigPaths: true,
},
build: {
emptyOutDir: false,
sourcemap: true,
lib: {
entry: "src/index.ts",
fileName: (format) => (format === "es" ? "index.js" : `index.${format}.js`),
formats: ["es"],
},
rollupOptions: {
external: ["react", "react-dom", "react/jsx-runtime", "react/jsx-dev-runtime"],
},
},
});
4 changes: 2 additions & 2 deletions packages/serverless-workflow-diagram-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
"format:check": "oxfmt --config .oxfmtrc.json --check",
"clean": "rimraf ./dist",
"clean:storybook": "rimraf ./dist-storybook",
"build:dev": "pnpm clean && tsc -p tsconfig.json",
"build:prod": "pnpm lint && pnpm clean && tsc -p tsconfig.json && pnpm test",
"build:dev": "pnpm clean && tsc -p tsconfig.json && vite build",
"build:prod": "pnpm lint && pnpm clean && tsc -p tsconfig.json && vite build && pnpm test",
"test": "vitest run --passWithNoTests",
"start": "storybook dev -p 6006 --no-open",
"build:storybook": "pnpm clean:storybook && storybook build --output-dir ./dist-storybook"
Expand Down
4 changes: 3 additions & 1 deletion packages/serverless-workflow-diagram-editor/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"types": ["node", "vite/client"],
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"sourceMap": false,
"emitDeclarationOnly": true,
"noEmitOnError": true,
"rootDir": "./src",
"outDir": "./dist"
},
Expand Down
35 changes: 35 additions & 0 deletions packages/serverless-workflow-diagram-editor/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* Copyright 2021-Present The Serverless Workflow Specification Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import { defineConfig } from "vite";

export default defineConfig({
resolve: {
tsconfigPaths: true,
},
build: {
emptyOutDir: false,
sourcemap: true,
lib: {
entry: "src/index.ts",
fileName: (format) => (format === "es" ? "index.js" : `index.${format}.js`),
formats: ["es"],
},
rollupOptions: {
external: ["react", "react-dom", "react/jsx-runtime", "react/jsx-dev-runtime"],
},
},
});
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.