mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-17 21:11:18 -05:00
7be97fb2e2
* Move deprecated CLI option to config * Reduce custom Storybook webpack config * Upgrade Storybook * Update package-lock.json GitOrigin-RevId: e480aa0298e481d3e78a62b91c067b62c05bdeaf
36 lines
830 B
JavaScript
36 lines
830 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',
|
|
'../modules/**/stories/**/*.stories.js',
|
|
],
|
|
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,
|
|
},
|
|
}
|
|
},
|
|
}
|