-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #551 from soramitsu/feature/WDS-129-update-vue
WDS-129 update vue
- Loading branch information
Showing
57 changed files
with
4,567 additions
and
7,619 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@soramitsu-ui/ui': minor | ||
--- | ||
|
||
**feat**: update vue and storybook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,34 @@ | ||
const path = require('path') | ||
const { loadConfigFromFile, mergeConfig } = require('vite') | ||
|
||
const path = require('path'); | ||
const { | ||
loadConfigFromFile, | ||
mergeConfig | ||
} = require('vite'); | ||
function resolve(...paths) { | ||
return path.resolve(__dirname, '..', ...paths) | ||
return path.resolve(__dirname, '..', ...paths); | ||
} | ||
|
||
module.exports = { | ||
stories: ['../stories/**/*.stories.@(js|jsx|ts|tsx)'], | ||
addons: ['@storybook/addon-links', '@storybook/addon-essentials'], | ||
core: { | ||
builder: 'storybook-builder-vite', | ||
}, | ||
/** | ||
* @param {import('vite').UserConfig} config | ||
*/ | ||
async viteFinal(config) { | ||
const { config: mainConfig } = await loadConfigFromFile( | ||
{ mode: 'development', command: 'serve' }, | ||
resolve('vite.config.ts'), | ||
) | ||
const { | ||
config: mainConfig | ||
} = await loadConfigFromFile({ | ||
mode: 'development', | ||
command: 'serve' | ||
}, resolve('vite.config.ts')); | ||
|
||
// vue plugin is already presented in storybook's config, so we need to deduplicate it | ||
mainConfig.plugins = mainConfig.plugins.filter((x) => !/vite:vue/.test(x.name)) | ||
|
||
return mergeConfig(config, mainConfig) | ||
mainConfig.plugins = mainConfig.plugins.filter(x => !/vite:vue/.test(x.name)); | ||
return mergeConfig(config, mainConfig); | ||
}, | ||
} | ||
framework: { | ||
name: '@storybook/vue3-vite', | ||
options: {} | ||
}, | ||
docs: { | ||
autodocs: true | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.