Skip to content

Commit

Permalink
Merge pull request #104 from kucrut/fix-96
Browse files Browse the repository at this point in the history
Respect user's build.sourcemap setting
  • Loading branch information
kucrut authored Jun 30, 2024
2 parents 4c60a7d + c40e329 commit c3f20c9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/tidy-avocados-sparkle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@kucrut/vite-for-wp': patch
---

Respect build.sourcemap option, props @ernilambar
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Vite integration for WordPress plugins and themes development.",
"author": "Dzikri Aziz",
"license": "MIT",
"packageManager": "pnpm@9.3.0",
"packageManager": "pnpm@9.4.0",
"type": "module",
"types": "types/index.d.ts",
"homepage": "https://github.com/kucrut/vite-for-wp",
Expand Down
4 changes: 2 additions & 2 deletions src/exports/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function v4wp( options = {} ) {
name: 'v4wp:config',
enforce: 'pre',

config() {
config( config ) {
return {
base: './',
build: {
Expand All @@ -43,7 +43,7 @@ export function v4wp( options = {} ) {
manifest: 'manifest.json',
modulePreload: false,
rollupOptions: { input },
sourcemap: true,
sourcemap: config.build?.sourcemap ?? true,
},
css: {
devSourcemap: true,
Expand Down

0 comments on commit c3f20c9

Please sign in to comment.