storybookjs / presets

🧩 Presets for Storybook
MIT License
424 stars 104 forks source link

[Question] Is there way to enable source maps? #192

Open PawelGIX opened 3 years ago

PawelGIX commented 3 years ago

Is there a way to enable source maps on SASS addon? EDIT: I will answer myself. BTW it would be good if this was the default option.


module.exports = {
  "stories": [
    "../stories/**/*.stories.mdx",
    "../stories/**/*.stories.@(js|jsx|ts|tsx)"
  ],
  "addons": [
    "@storybook/addon-links",
    "@storybook/addon-essentials",
    {
        name: '@storybook/preset-scss',
        options: {
          cssLoaderOptions: {
            sourceMap: true,
          }
        }
    },
  ]```