Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
module.exports = (storybookBaseConfig, configType) => {
const storybookConfig = genStorybookDefaultConfig(
storybookBaseConfig,
configType
);
return {
...vueConfig, // use vue's webpack configuration by default
entry: storybookConfig.entry, // overwite entry
output: storybookConfig.output, // overwrite output
// remove duplicated plugins
plugins: merge({
customizeArray: merge.unique(
"plugins",
[
"HotModuleReplacementPlugin",
"CaseSensitivePathsPlugin",
"WatchMissingNodeModulesPlugin"
module.exports = (baseConfig, env) => {
const config = genDefaultConfig(baseConfig, env);
baseConfig.module.rules[1].options = {
loaders: {
story: storyLoader
}
};
// Add js, json and vue extension support
config.resolve.extensions.push(".js", ".vue", ".json");
// Add alias for @ pointing to src
config.resolve.alias["@"] = path.resolve("src");
return config;
};