Skip to content

Commit

Permalink
Remove unneeded css-url logic for prod build
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Polhemus committed Jun 17, 2022
1 parent 41f2cb0 commit 217e965
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions packages/vite-plugin-shopify/src/css-url.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,6 @@ export default function VitePluginCssUrl (): Plugin {
}
}
}
},
generateBundle (outputOptions, bundle) {
for (const file in bundle) {
const asset = bundle[file]

if (asset.type === 'asset' && typeof asset.source === 'string' && asset.fileName.endsWith('.css')) {
// Strip leading slash from CSS URLs in production to load assets from CDN path relative to CSS file
asset.source = asset.source.replaceAll(/url\(\//g, 'url(')
}
}
}
}
}

0 comments on commit 217e965

Please sign in to comment.