@pure-ds/storybook 0.3.16 → 0.3.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.storybook/main.js +6 -2
- package/package.json +2 -2
package/.storybook/main.js
CHANGED
|
@@ -160,12 +160,16 @@ const config = {
|
|
|
160
160
|
}
|
|
161
161
|
|
|
162
162
|
// Support absolute path imports like: import { html } from '/assets/js/lit.js';
|
|
163
|
-
// Vite blocks direct imports from public/, so we
|
|
164
|
-
//
|
|
163
|
+
// Vite blocks direct imports from public/, so we disable Vite's public directory
|
|
164
|
+
// handling (Storybook uses staticDirs instead) and resolve these imports ourselves.
|
|
165
165
|
const userPublicPath = resolve(process.cwd(), 'public');
|
|
166
166
|
const isConsumerProject = process.cwd() !== resolve(currentDirname, '..');
|
|
167
167
|
|
|
168
168
|
if (isConsumerProject && fs.existsSync(userPublicPath)) {
|
|
169
|
+
// Disable Vite's public directory to prevent "Cannot import non-asset file" errors
|
|
170
|
+
// Storybook's staticDirs handles serving public files at runtime
|
|
171
|
+
config.publicDir = false;
|
|
172
|
+
|
|
169
173
|
config.plugins = config.plugins || [];
|
|
170
174
|
// Insert at the beginning to run before other plugins
|
|
171
175
|
config.plugins.unshift({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pure-ds/storybook",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.18",
|
|
4
4
|
"description": "Storybook showcase for Pure Design System with live configuration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"storybook:build": "npm run build-storybook"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@pure-ds/core": "^0.3.
|
|
35
|
+
"@pure-ds/core": "^0.3.18"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@custom-elements-manifest/analyzer": "^0.11.0",
|