Skip to content

Commit

Permalink
fix: tailwind tokens not working with pnpm, fix #282
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed Feb 5, 2023
1 parent d23a541 commit f155491
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packages/histoire/src/node/util/vendors.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
import path from 'node:path'
import { fileURLToPath } from 'node:url'

// Resolve an absolute path to e.g. node_modules/.pnpm/histoire@0.11.7_vite@3.2.4/node_modules/histoire/dist/node/vendors/controls.js
// https://github.com/histoire-dev/histoire/issues/282
export const __dirname = path.dirname(fileURLToPath(import.meta.url))

// https://github.com/vitejs/vite/issues/9661
const alias = {
'@histoire/vendors/vue': 'histoire/dist/node/vendors/vue.js',
'@histoire/controls': 'histoire/dist/node/vendors/controls.js',
'@histoire/vendors/vue': path.resolve(__dirname, '../vendors/vue.js'),
'@histoire/controls': path.resolve(__dirname, '../vendors/controls.js'),
}

export function getInjectedImport (request: string) {
Expand Down

0 comments on commit f155491

Please sign in to comment.