-
-
Notifications
You must be signed in to change notification settings - Fork 216
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve iframe implementation in playground
- Loading branch information
1 parent
c3fac56
commit d7404a8
Showing
3 changed files
with
57 additions
and
31 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 |
---|---|---|
@@ -1,9 +1,23 @@ | ||
import { defineConfig } from 'tsup'; | ||
|
||
export default defineConfig({ | ||
entry: ['./src/index.ts'], | ||
clean: true, | ||
format: ['esm', 'cjs'], | ||
dts: true, | ||
outDir: './dist', | ||
}); | ||
export default defineConfig([ | ||
{ | ||
entry: ['./src/index.ts'], | ||
clean: true, | ||
format: ['esm', 'cjs'], | ||
minify: false, | ||
dts: true, | ||
outDir: './dist', | ||
}, | ||
{ | ||
entry: ['./src/index.ts'], | ||
clean: true, | ||
format: ['esm', 'cjs'], | ||
minify: true, | ||
dts: false, | ||
outDir: './dist', | ||
outExtension: ({ format }) => ({ | ||
js: format === 'cjs' ? '.min.cjs' : '.min.js', | ||
}), | ||
}, | ||
]); |
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,3 +1,11 @@ | ||
# Netlify build config | ||
[build] | ||
publish = "dist" | ||
command = "cd ../library && npm run build && cd ../website && npm run sitemap && npm run build" | ||
publish = "dist" | ||
command = "cd ../library && npm run build && cd ../website && npm run sitemap && npm run build" | ||
|
||
# Netlify headers config | ||
[[headers]] | ||
# This is a temporary solution to be able to load the Valibot library into the playground iframe | ||
for = "/build/*" | ||
[headers.values] | ||
access-control-allow-origin = "*" |
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