mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
7f4934d619
GitOrigin-RevId: f070c8555d570bfdf02958bfbb241def8cacb263
36 lines
848 B
JavaScript
36 lines
848 B
JavaScript
const path = require('path')
|
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
|
|
|
|
// NOTE: must be set before webpack config is imported
|
|
process.env.SHARELATEX_CONFIG = path.resolve(
|
|
__dirname,
|
|
'../config/settings.webpack.js'
|
|
)
|
|
|
|
const customConfig = require('../webpack.config.dev')
|
|
|
|
module.exports = {
|
|
staticDirs: ['../public'],
|
|
stories: [
|
|
'../frontend/stories/**/*.stories.{js,ts,tsx}',
|
|
'../modules/**/stories/**/*.stories.{js,ts,tsx}',
|
|
],
|
|
addons: ['@storybook/addon-essentials', '@storybook/addon-a11y'],
|
|
webpackFinal: storybookConfig => {
|
|
const rules = [
|
|
...storybookConfig.module.rules,
|
|
{
|
|
test: /\.worker\.js$/,
|
|
use: 'worker-loader',
|
|
},
|
|
]
|
|
|
|
return {
|
|
...storybookConfig,
|
|
module: {
|
|
...storybookConfig.module,
|
|
rules,
|
|
},
|
|
}
|
|
},
|
|
}
|