mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-05 06:01:22 +08:00
29 lines
692 B
JavaScript
29 lines
692 B
JavaScript
module.exports = {
|
|
// Don't try to find .babelrc because we want to force this configuration.
|
|
babelrc: false,
|
|
presets: [
|
|
[
|
|
require.resolve('babel-preset-env'),
|
|
{
|
|
targets: {
|
|
browsers: ['last 2 versions', 'safari >= 7'],
|
|
},
|
|
modules: process.env.NODE_ENV === 'test' ? 'commonjs' : false,
|
|
},
|
|
],
|
|
require.resolve('babel-preset-stage-0'),
|
|
],
|
|
plugins: [
|
|
require.resolve('babel-plugin-macros'),
|
|
require.resolve('babel-plugin-transform-regenerator'),
|
|
[
|
|
require.resolve('babel-plugin-transform-runtime'),
|
|
{
|
|
helpers: true,
|
|
polyfill: true,
|
|
regenerator: true,
|
|
},
|
|
],
|
|
],
|
|
};
|