Skip to content

Commit

Permalink
Use variable names in vite and unplugin
Browse files Browse the repository at this point in the history
  • Loading branch information
brijeshb42 committed Aug 30, 2024
1 parent 7b67221 commit 9462e64
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/pigment-css-unplugin/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,11 @@ export const plugin = createUnplugin<PigmentOptions, true>((options) => {
compiler.options.resolve.plugins = compiler.options.resolve.plugins || [];
compiler.options.resolve.plugins.push(resolverPlugin);
},
async transform(code, filePath) {
const [pathSegment] = filePath.split('?');
async transform(code, url) {
const [filePath] = url.split('?');
// Converts path separator as per platform, even on Windows, path segments have `/` instead of the usual `\`,
// so this function replaces such path separators.
const id = path.normalize(pathSegment);
const id = path.normalize(filePath);
const transformServices = {
options: {
filename: id,
Expand Down

0 comments on commit 9462e64

Please sign in to comment.