Skip to content

Commit

Permalink
fix(build): Fixing issues with Storybook/Vite dev mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
himerus committed Mar 8, 2024
1 parent 83574ae commit 8344382
Show file tree
Hide file tree
Showing 6 changed files with 318 additions and 310 deletions.
6 changes: 5 additions & 1 deletion .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,15 @@ module.exports = {
modernInlineRender: false,
},
framework: {
name: '@storybook/web-components-vite',
name: getAbsolutePath('@storybook/web-components-vite'),
options: {},
},
docs: {
autodocs: true,
defaultName: 'Documentation', // set to change the name of generated docs entries
},
};

function getAbsolutePath(value) {
return dirname(require.resolve(join(value, 'package.json')));
}
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"clean:storybook": "rimraf storybook-static",
"clean:css": "rimraf packages/**/*.lit.*",
"clean:maps": "rimraf packages/**/*.map",
"clean:types": "rimraf packages/**/*.d.ts",
"clean:types": "rimraf 'packages/**/!(component).d.ts'",
"dev": "yarn watch",
"fix": "yarn format && yarn lint",
"format": "npm-run-all -s format:*",
Expand Down Expand Up @@ -85,12 +85,12 @@
"@commitlint/cli": "^17.4.0",
"@commitlint/config-conventional": "^17.4.0",
"@open-wc/testing": "^3.0.0-next.2",
"@storybook/addon-actions": "^7.6.16",
"@storybook/addon-docs": "^7.6.16",
"@storybook/addon-essentials": "^7.6.16",
"@storybook/addon-links": "^7.6.16",
"@storybook/web-components": "^7.6.16",
"@storybook/web-components-vite": "^7.6.16",
"@storybook/addon-actions": "^7.6.17",
"@storybook/addon-docs": "^7.6.17",
"@storybook/addon-essentials": "^7.6.17",
"@storybook/addon-links": "^7.6.17",
"@storybook/web-components": "^7.6.17",
"@storybook/web-components-vite": "^7.6.17",
"@types/estree": "^0.0.47",
"@typescript-eslint/eslint-plugin": "^5.0.0",
"@typescript-eslint/parser": "^5.0.0",
Expand Down Expand Up @@ -119,7 +119,7 @@
"react-syntax-highlighter": "^15.5.0",
"rimraf": "^3.0.2",
"rsync": "^0.6.1",
"storybook": "^7.6.16",
"storybook": "^7.6.17",
"svgo": "^2.8.0",
"tailwindcss": "3.0.0",
"ts-lit-plugin": "^1.2.1",
Expand Down
18 changes: 8 additions & 10 deletions packages/components/outline-core-alert/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"types": "dist/src/outline-core-alert.d.ts",
"files": [
"/dist/",
"/src/",
Expand All @@ -32,22 +32,20 @@
"build": "node ../../../scripts/build.js",
"package": "yarn publish"
},
"dependencies": {
"lit": "^3.1.2"
},
"publishConfig": {
"access": "public"
},
"exports": {
".": {
"development": "./src/index.ts",
"production": "./dist/index.js",
"import": "./index.ts",
"require": "./dist/index.js",
"default": "./dist/index.js"
},
"./package.json": "./package.json"
},
"devDependencies": {
"@phase2/outline-adopted-stylesheets-controller": "^1.0.2",
"@phase2/outline-core": "^0.2.7"
}
"dependencies": {
"lit": "^3.1.2",
"@phase2/outline-adopted-stylesheets-controller": "^1.0.2"
},
"devDependencies": {}
}
15 changes: 9 additions & 6 deletions packages/components/outline-core-link/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"types": "dist/src/outline-core-link.d.ts",
"files": [
"/dist/",
"/src/",
Expand All @@ -35,19 +35,22 @@
"build": "node ../../../scripts/bundle.js",
"package": "yarn publish"
},
"dependencies": {
"lit": "^3.1.2"
},
"publishConfig": {
"access": "public"
},
"exports": {
".": {
"import": "./index.ts",
"require": "./dist/index.js",
"default": "./dist/index.js"
}
},
"./package.json": "./package.json"
},
"dependencies": {
"lit": "^3.1.2",
"@phase2/outline-adopted-stylesheets-controller": "^1.0.2"
},
"devDependencies": {
"@phase2/outline-adopted-stylesheets-controller": "^1.0.2",
"postcss": "^8.4.35",
"postcss-discard-comments": "^6.0.1",
"postcss-nested": "^6.0.1",
Expand Down
21 changes: 12 additions & 9 deletions packages/controllers/adopted-stylesheets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"types": "dist/src/adopted-stylesheets.d.ts",
"files": [
"/dist/",
"/src/",
Expand All @@ -36,19 +36,22 @@
"build": "node ../../../scripts/bundle.js",
"package": "yarn publish"
},
"dependencies": {
"lit": "^3.1.2"
},
"devDependencies": {
"tslib": "^2.6.2",
"vite": "^5.1.4"
},
"publishConfig": {
"access": "public"
},
"exports": {
".": {
"import": "./index.ts",
"require": "./dist/index.js",
"default": "./dist/index.js"
}
},
"./package.json": "./package.json"
},
"dependencies": {
"lit": "^3.1.2"
},
"devDependencies": {
"tslib": "^2.6.2",
"vite": "^5.1.4"
}
}
Loading

0 comments on commit 8344382

Please sign in to comment.