Skip to content

Instantly share code, notes, and snippets.

@fatihdgn
Last active May 30, 2019 11:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fatihdgn/3037e8bf176f1e330964d4045832353e to your computer and use it in GitHub Desktop.
Save fatihdgn/3037e8bf176f1e330964d4045832353e to your computer and use it in GitHub Desktop.
Create an Angular Component Library w/ StoryBook - Section II
const path = require('path');
const includePath = path.resolve(__dirname, '..')
module.exports = {
module: {
rules: [
{
test: [/\.stories\.tsx?$/, /index\.ts$/],
loaders: [
{
loader: require.resolve('@storybook/addon-storysource/loader'),
options: {
parser: 'typescript'
}
}
],
include: [path.resolve(__dirname, '../src')],
enforce: 'pre'
},
{
test: /\.css$/,
include: includePath,
use: ['to-string-loader', 'css-loader']
}
]
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment