Skip to content

Commit

Permalink
fix: md files to use raw-loader
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Jan 3, 2021
1 parent a5a59eb commit f3b5297
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 9 deletions.
4 changes: 2 additions & 2 deletions core/webpack-configs/src/instrument/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const instrument: Configuration = {
],
},
{
test: /\.(md|mdx)$/,
test: /\.mdx$/i,
exclude: [/node_modules/],
loader: 'babel-loader',
options: {
Expand All @@ -26,7 +26,7 @@ export const instrument: Configuration = {
},
},
{
test: /\.(md|mdx)$/,
test: /\.mdx$/i,
exclude: [/node_modules/],
loader: '@component-controls/loader/loader',
enforce: 'pre',
Expand Down
4 changes: 2 additions & 2 deletions core/webpack-configs/src/react-docgen-typescript/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const reactDocgenTypescript: Configuration = {
module: {
rules: [
{
test: /\.(md|mdx)$/,
test: /\.mdx$/i,
exclude: [/node_modules/],
loader: '@component-controls/loader/loader',
enforce: 'pre',
Expand All @@ -23,7 +23,7 @@ export const reactDocgenTypescript: Configuration = {
},

{
test: /\.(story|stories).(js|jsx|ts|tsx|mdx)$/,
test: /\.(story|stories).(js|jsx|ts|tsx|mdx)$/i,
loader: '@component-controls/loader/loader',
exclude: [/node_modules/],
enforce: 'pre',
Expand Down
2 changes: 1 addition & 1 deletion core/webpack-configs/src/react-docgen/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const reactDocgen: Configuration = {
module: {
rules: [
{
test: /\.(md|mdx)$/,
test: /\.mdx$/i,
exclude: [/node_modules/],
loader: '@component-controls/loader/loader',
enforce: 'pre',
Expand Down
16 changes: 12 additions & 4 deletions core/webpack-configs/src/react/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export const react: PresetType = (options: BuildProps) => {
],
},
{
test: /\.(md|mdx)$/i,
test: /\.mdx$/i,
exclude: [/node_modules/],
loader: 'babel-loader',
options: {
Expand All @@ -100,7 +100,7 @@ export const react: PresetType = (options: BuildProps) => {
},
},
{
test: /\.(eot|md|svg|ico|jpg|jpeg|png|gif|ttf|woff|woff2|pdf|mp4|web|wav|mp3|m4a|aac|oga)$/i,
test: /\.(eot|svg|ico|jpg|jpeg|png|gif|ttf|woff|woff2|pdf|mp4|web|wav|mp3|m4a|aac|oga)$/i,
exclude: [/node_modules/],
loader: 'url-loader',
options: customLoaderOptions(options, 'url-loader', {
Expand Down Expand Up @@ -167,9 +167,17 @@ export const react: PresetType = (options: BuildProps) => {
},
],
},

{
test: /\.(md|mdx)$/i,
test: /\.md$/i,
use: [
{
loader: 'raw-loader',
options: customLoaderOptions(options, 'raw-loader', {}),
},
],
},
{
test: /\.mdx$/i,
exclude: [/node_modules/],
loader: '@component-controls/loader/loader',
enforce: 'pre',
Expand Down

0 comments on commit f3b5297

Please sign in to comment.