Last active
March 15, 2019 09:07
-
-
Save shilman/e344c686cfb1f6901ae522b49c33bbb9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SB5.0.1 | |
const path = require('path') | |
module.exports = ({ config }) => { | |
// For example, add SVG loader: | |
config.module.rules.push({ | |
test: /\.svg$/, | |
loaders: ['svg-url-loader'], | |
include: path.resolve(__dirname, '../'), | |
}) | |
config.resolve.extensions.push('.svg') | |
console.dir(config, { depth: null }) | |
return config | |
} | |
==== | |
{ mode: 'development', | |
bail: false, | |
devtool: '#cheap-module-source-map', | |
entry: | |
[ '/Users/shilman/projects/storybook/testing/gatsby2/node_modules/@storybook/core/dist/server/common/polyfills.js', | |
'/Users/shilman/projects/storybook/testing/gatsby2/node_modules/@storybook/core/dist/server/preview/globals.js', | |
'/Users/shilman/projects/storybook/testing/gatsby2/.storybook/config.js', | |
'/Users/shilman/projects/storybook/testing/gatsby2/node_modules/webpack-hot-middleware/client.js?reload=true' ], | |
output: | |
{ path: '/Users/shilman/projects/storybook/testing/gatsby2/node_modules/@storybook/core/dist/public', | |
filename: '[name].[hash].bundle.js', | |
publicPath: '' }, | |
plugins: | |
[ HtmlWebpackPlugin { | |
options: | |
{ template: '/Users/shilman/projects/storybook/testing/gatsby2/node_modules/@storybook/core/dist/server/templates/index.ejs', | |
templateContent: false, | |
templateParameters: [Function: templateParameters], | |
filename: 'iframe.html', | |
hash: false, | |
inject: false, | |
compile: true, | |
favicon: false, | |
minify: undefined, | |
cache: true, | |
showErrors: true, | |
chunks: 'all', | |
excludeChunks: [], | |
chunksSortMode: 'none', | |
meta: {}, | |
title: 'Webpack App', | |
xhtml: false, | |
alwaysWriteToDisk: true }, | |
childCompilerHash: undefined, | |
childCompilationOutputName: undefined, | |
assetJson: undefined, | |
hash: undefined, | |
version: 4 }, | |
DefinePlugin { | |
definitions: | |
{ 'process.env': { NODE_ENV: '"development"', NODE_PATH: '""', PUBLIC_URL: '"."' } } }, | |
WatchMissingNodeModulesPlugin { | |
nodeModulesPath: '/Users/shilman/projects/storybook/testing/gatsby2/node_modules' }, | |
HotModuleReplacementPlugin { | |
options: {}, | |
multiStep: undefined, | |
fullBuildTimeout: 200, | |
requestTimeout: 10000 }, | |
CaseSensitivePathsPlugin { options: {}, pathCache: {}, fsOperations: 0, primed: false }, | |
ProgressPlugin { | |
profile: false, | |
handler: undefined, | |
modulesCount: 500, | |
showEntries: false, | |
showModules: true, | |
showActiveModules: true }, | |
DefinePlugin { definitions: {} } ], | |
module: | |
{ rules: | |
[ { test: /\.(mjs|jsx?)$/, | |
use: | |
[ { loader: 'babel-loader', | |
options: | |
{ cacheDirectory: '/Users/shilman/projects/storybook/testing/gatsby2/node_modules/.cache/storybook', | |
presets: | |
[ [ '/Users/shilman/projects/storybook/testing/gatsby2/node_modules/@babel/preset-env/lib/index.js', | |
{ shippedProposals: true, useBuiltIns: 'usage' } ], | |
'/Users/shilman/projects/storybook/testing/gatsby2/node_modules/@babel/preset-react/lib/index.js', | |
'/Users/shilman/projects/storybook/testing/gatsby2/node_modules/@babel/preset-flow/lib/index.js' ], | |
plugins: | |
[ '/Users/shilman/projects/storybook/testing/gatsby2/node_modules/@babel/plugin-proposal-object-rest-spread/lib/index.js', | |
'/Users/shilman/projects/storybook/testing/gatsby2/node_modules/@babel/plugin-proposal-class-properties/lib/index.js', | |
'/Users/shilman/projects/storybook/testing/gatsby2/node_modules/@babel/plugin-syntax-dynamic-import/lib/index.js', | |
[ '/Users/shilman/projects/storybook/testing/gatsby2/node_modules/babel-plugin-emotion/dist/babel-plugin-emotion.cjs.js', | |
{ sourceMap: true, autoLabel: true } ], | |
'/Users/shilman/projects/storybook/testing/gatsby2/node_modules/babel-plugin-macros/dist/index.js', | |
'/Users/shilman/projects/storybook/testing/gatsby2/node_modules/@babel/plugin-transform-react-constant-elements/lib/index.js', | |
'/Users/shilman/projects/storybook/testing/gatsby2/node_modules/babel-plugin-add-react-displayname/index.js', | |
[ '/Users/shilman/projects/storybook/testing/gatsby2/node_modules/babel-plugin-react-docgen/lib/index.js', | |
{ DOC_GEN_COLLECTION_NAME: 'STORYBOOK_REACT_CLASSES' } ] ] } } ], | |
include: [ '/Users/shilman/projects/storybook/testing/gatsby2' ], | |
exclude: | |
[ '/Users/shilman/projects/storybook/testing/gatsby2/node_modules' ] }, | |
{ test: /\.md$/, | |
use: | |
[ { loader: '/Users/shilman/projects/storybook/testing/gatsby2/node_modules/@storybook/core/node_modules/raw-loader/index.js' } ] }, | |
{ test: /\.css$/, | |
use: | |
[ '/Users/shilman/projects/storybook/testing/gatsby2/node_modules/@storybook/core/node_modules/style-loader/index.js', | |
{ loader: '/Users/shilman/projects/storybook/testing/gatsby2/node_modules/@storybook/core/node_modules/css-loader/dist/cjs.js', | |
options: { importLoaders: 1 } }, | |
{ loader: '/Users/shilman/projects/storybook/testing/gatsby2/node_modules/@storybook/core/node_modules/postcss-loader/src/index.js', | |
options: { ident: 'postcss', postcss: {}, plugins: [Function: plugins] } } ] }, | |
{ test: /\.(svg|ico|jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|cur|ani)(\?.*)?$/, | |
loader: '/Users/shilman/projects/storybook/testing/gatsby2/node_modules/@storybook/core/node_modules/file-loader/dist/cjs.js', | |
query: { name: 'static/media/[name].[hash:8].[ext]' } }, | |
{ test: /\.(mp4|webm|wav|mp3|m4a|aac|oga)(\?.*)?$/, | |
loader: '/Users/shilman/projects/storybook/testing/gatsby2/node_modules/url-loader/dist/cjs.js', | |
query: { limit: 10000, name: 'static/media/[name].[hash:8].[ext]' } }, | |
{ test: /\.svg$/, | |
loaders: [ 'svg-url-loader' ], | |
include: '/Users/shilman/projects/storybook/testing/gatsby2' } ] }, | |
resolve: | |
{ extensions: [ '.mjs', '.js', '.jsx', '.json', '.svg' ], | |
modules: [ 'node_modules' ], | |
alias: | |
{ 'core-js': '/Users/shilman/projects/storybook/testing/gatsby2/node_modules/core-js', | |
react: '/Users/shilman/projects/storybook/testing/gatsby2/node_modules/react', | |
'react-dom': '/Users/shilman/projects/storybook/testing/gatsby2/node_modules/react-dom' } }, | |
optimization: | |
{ splitChunks: { chunks: 'all' }, | |
runtimeChunk: true, | |
minimizer: | |
[ TerserPlugin { | |
options: | |
{ test: /\.m?js(\?.*)?$/i, | |
chunkFilter: [Function: chunkFilter], | |
warningsFilter: [Function: warningsFilter], | |
extractComments: false, | |
sourceMap: true, | |
cache: true, | |
cacheKeys: [Function: cacheKeys], | |
parallel: true, | |
include: undefined, | |
exclude: undefined, | |
minify: undefined, | |
terserOptions: | |
{ output: { comments: /^\**!|@preserve|@license|@cc_on/i }, | |
mangle: false, | |
keep_fnames: true } } } ] }, | |
performance: { hints: false } } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment