Skip to content

Commit 5a24da1

Browse files
committed
[kbn-storybook] Use raw loader for text files (elastic#64108)
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.
1 parent 2573d2a commit 5a24da1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/kbn-storybook/storybook_config/webpack.config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,13 @@ module.exports = async ({ config }) => {
4949
},
5050
});
5151

52+
config.module.rules.push({
53+
test: /\.(html|md|txt|tmpl)$/,
54+
use: {
55+
loader: 'raw-loader',
56+
},
57+
});
58+
5259
// Handle Typescript files
5360
config.module.rules.push({
5461
test: /\.tsx?$/,

0 commit comments

Comments
 (0)