Skip to content

Commit

Permalink
Revert "fix(storybook): apply a webpack tweak for storybook and angul…
Browse files Browse the repository at this point in the history
…ar (#8392)" (#8486)

This reverts commit 77529a1.
  • Loading branch information
mandarini committed Jan 12, 2022
1 parent 798d7e2 commit 31b8b46
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,7 @@ module.exports = {
if (rootMain.webpackFinal) {
config = await rootMain.webpackFinal(config, { configType });
}
// remove html raw-loader that breaks Jit compilation
const rules = (config.module.rules ?? []).filter(
(rule) =>
rule.test !== /\\\\.html$/ &&
rule.exclude !== /\\\\.async\\\\.html$/ &&
!rule.loader?.includes('raw-loader')
);
config.module.rules = [...rules];
// add your own webpack tweaks if needed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,7 @@ module.exports = {
if (rootMain.webpackFinal) {
config = await rootMain.webpackFinal(config, { configType });
}
// remove html raw-loader that breaks Jit compilation
const rules = (config.module.rules ?? []).filter(
(rule) =>
rule.test !== /\\\\.html$/ &&
rule.exclude !== /\\\\.async\\\\.html$/ &&
!rule.loader?.includes('raw-loader')
);
config.module.rules = [...rules];
// add your own webpack tweaks if needed
Expand Down Expand Up @@ -70,24 +59,13 @@ module.exports = {
if (rootMain.webpackFinal) {
config = await rootMain.webpackFinal(config, { configType });
}
// for backwards compatibility call the \`rootWebpackConfig\`
// this can be removed once that one is migrated fully to
// use the \`webpackFinal\` property in the \`main.js\` file
config = rootWebpackConfig({ config });
// remove html raw-loader that breaks Jit compilation
const rules = (config.module.rules ?? []).filter(
(rule) =>
rule.test !== /\\\\.html$/ &&
rule.exclude !== /\\\\.async\\\\.html$/ &&
!rule.loader?.includes('raw-loader')
);
config.module.rules = [...rules];
// add your own webpack tweaks if needed
return config;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,13 @@ module.exports = {
if (rootMain.webpackFinal) {
config = await rootMain.webpackFinal(config, { configType });
}

<% if (existsRootWebpackConfig) { %>// for backwards compatibility call the `rootWebpackConfig`
// this can be removed once that one is migrated fully to
// use the `webpackFinal` property in the `main.js` file
config = rootWebpackConfig({ config });
<% } %>

<% if (uiFramework === '@storybook/angular') { %>
// remove html raw-loader that breaks Jit compilation
const rules = (config.module.rules ?? []).filter(
(rule) =>
rule.test !== /\.html$/ &&
rule.exclude !== /\.async\.html$/ &&
!rule.loader?.includes('raw-loader')
);
config.module.rules = [...rules];
<% } %>

// add your own webpack tweaks if needed

return config;
Expand Down

0 comments on commit 31b8b46

Please sign in to comment.