Skip to content

Commit

Permalink
Merge pull request #12461 from merceyz/merceyz/vue
Browse files Browse the repository at this point in the history
Addon-docs: Resolve vue-docgen-loader from @storybook/vue
  • Loading branch information
shilman authored Sep 12, 2020
2 parents cefec18 + 75db58d commit a29be5e
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ jobs:
command: yarn info @storybook/core
- run:
name: run e2e tests
command: yarn test:e2e-framework --use-yarn-2 cra
command: yarn test:e2e-framework --use-yarn-2 sfcVue cra
- store_artifacts:
path: /tmp/storybook/cypress
destination: cypress
Expand Down
13 changes: 5 additions & 8 deletions addons/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
"@emotion/core": "^10.0.20",
"@emotion/styled": "^10.0.17",
"@storybook/react": "6.1.0-alpha.8",
"@storybook/vue": "6.1.0-alpha.8",
"@storybook/web-components": "6.1.0-alpha.8",
"@types/cross-spawn": "^6.0.1",
"@types/doctrine": "^0.0.3",
Expand Down Expand Up @@ -118,24 +119,20 @@
},
"peerDependencies": {
"@babel/core": "^7.0.0-0",
"@storybook/vue": "6.1.0-alpha.8",
"babel-loader": "^8.0.0",
"sveltedoc-parser": "^3.0.4",
"vue": "^2.6.10",
"vue-docgen-api": "^4.29.1",
"vue-docgen-loader": "^1.5.0",
"webpack": ">=4"
},
"peerDependenciesMeta": {
"sveltedoc-parser": {
"optional": true
},
"vue": {
"@storybook/vue": {
"optional": true
},
"vue-docgen-api": {
"sveltedoc-parser": {
"optional": true
},
"vue-docgen-loader": {
"vue": {
"optional": true
},
"webpack": {
Expand Down
2 changes: 1 addition & 1 deletion addons/docs/src/frameworks/vue/preset.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export function webpackFinal(webpackConfig: any = {}, options: any = {}) {
webpackConfig.module.rules.push({
test: /\.vue$/,
loader: require.resolve('vue-docgen-loader'),
loader: require.resolve('vue-docgen-loader', { paths: [require.resolve('@storybook/vue')] }),
enforce: 'post',
options: {
docgenOptions: {
Expand Down
15 changes: 14 additions & 1 deletion addons/essentials/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,24 @@
"ts-dedent": "^1.1.1"
},
"devDependencies": {
"@babel/core": "^7.9.6",
"@storybook/vue": "6.1.0-alpha.8",
"@types/jest": "^25.1.1",
"@types/webpack-env": "^1.15.2"
},
"peerDependencies": {
"babel-loader": "^8.0.0"
"@babel/core": "^7.9.6",
"@storybook/vue": "6.1.0-alpha.8",
"babel-loader": "^8.0.0",
"webpack": ">=4"
},
"peerDependenciesMeta": {
"@storybook/vue": {
"optional": true
},
"webpack": {
"optional": true
}
},
"publishConfig": {
"access": "public"
Expand Down
8 changes: 7 additions & 1 deletion scripts/run-e2e-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,13 @@ export const sfcVue: Parameters = {
name: 'sfcVue',
version: 'latest',
generator: fromDeps('vue', 'vue-loader', 'vue-template-compiler'),
additionalDeps: ['react', 'react-dom'],
additionalDeps: [
'react',
'react-dom',
'webpack',
// TODO: remove when https://github.com/storybookjs/storybook/issues/11255 is solved
'core-js',
],
};

export const svelte: Parameters = {
Expand Down

0 comments on commit a29be5e

Please sign in to comment.