How to use the @storybook/vue/dist/server/config/defaults/webpack.config.js function in @storybook/vue

To help you get started, we’ve selected a few @storybook/vue examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github storybookjs / vue-cli-plugin-storybook / generator / template / config / storybook / webpack.config.js View on Github external
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"
github mattrothenberg / vue-grid-styled / .storybook / webpack.config.js View on Github external
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;
};