Skip to content

Commit

Permalink
[kbn-storybook] Use raw loader for text files
Browse files Browse the repository at this point in the history
Starting Storybook (with `yarn storybook apm`) was failing to start because it was having trouble loading Angular .html templates.

Use the raw loader in the webpack config for storybook, same as the Webpack config in kbn-optimizer.
  • Loading branch information
smith committed Apr 21, 2020
1 parent 5501fb4 commit ab6c56b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/kbn-storybook/storybook_config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ module.exports = async ({ config }) => {
},
});

config.module.rules.push({
test: /\.(html|md|txt|tmpl)$/,
use: {
loader: 'raw-loader',
},
});

// Handle Typescript files
config.module.rules.push({
test: /\.tsx?$/,
Expand Down

0 comments on commit ab6c56b

Please sign in to comment.