Skip to content

Commit

Permalink
Add source maps
Browse files Browse the repository at this point in the history
  • Loading branch information
FIameCaster committed Dec 21, 2023
1 parent 2f4f534 commit 35c96d3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package/scripts/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ for (const theme of themes) {
}

let themeMod = fs.readFileSync("dist/themes/index.js", "utf-8")
const regex = RegExp(`(${themes.join("|")})(-[0-9a-f]+)\.js`)
const regex = RegExp(`^(${themes.join("|")})(-\\w+)\.js$`)
const entries = await fs.promises.readdir("dist", { withFileTypes: true })

for (const entry of entries) {
Expand Down
1 change: 1 addition & 0 deletions package/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ for (const lang of ["clike", "css", "html", "jsx", "python", "xml", "index"])
export default defineConfig({
build: {
cssCodeSplit: true,
sourcemap: 'true',
lib: {
entry: entries,
formats: ["es"],
Expand Down
1 change: 1 addition & 0 deletions website/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { defineConfig } from "vite"
export default defineConfig({
build: {
target: ["es2020", "safari14"],
sourcemap: true,
modulePreload: {
polyfill: false,
},
Expand Down

0 comments on commit 35c96d3

Please sign in to comment.