From b7d51d076df01577313c724ab54419ce41667d17 Mon Sep 17 00:00:00 2001 From: Danilo Woznica Date: Wed, 11 Sep 2024 14:33:53 +0100 Subject: [PATCH] fix: postcss transpile to angular template (#8606) --- packages/app/src/sandbox/eval/presets/angular-cli/index.ts | 6 +++--- .../babel-plugin-transform-prevent-infinite-loops.ts | 2 +- packages/app/src/sandbox/worker/sw.no-webpack.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/app/src/sandbox/eval/presets/angular-cli/index.ts b/packages/app/src/sandbox/eval/presets/angular-cli/index.ts index 28013007e71..709a1f2da2f 100644 --- a/packages/app/src/sandbox/eval/presets/angular-cli/index.ts +++ b/packages/app/src/sandbox/eval/presets/angular-cli/index.ts @@ -238,8 +238,8 @@ export default function initialize() { const styles = { css: [postcssWithConfig], - scss: [sassWithConfig], - sass: [sassWithConfig], + scss: [sassWithConfig, postcssWithConfig], + sass: [sassWithConfig, postcssWithConfig], less: [lessWithConfig], styl: [stylusWithConfig], }; @@ -253,7 +253,7 @@ export default function initialize() { return Object.keys(styles).forEach(type => { preset.registerTranspiler( module => new RegExp(`\\.${type}$`).test(module.path), - [...styles[type], { transpiler: stylesTranspiler }] + [...styles[type], { transpiler: stylesTranspiler, options: {} }] ); }); } diff --git a/packages/app/src/sandbox/eval/transpilers/babel/worker/plugins/babel-plugin-transform-prevent-infinite-loops.ts b/packages/app/src/sandbox/eval/transpilers/babel/worker/plugins/babel-plugin-transform-prevent-infinite-loops.ts index 42edeb9aed0..3a12cb70945 100644 --- a/packages/app/src/sandbox/eval/transpilers/babel/worker/plugins/babel-plugin-transform-prevent-infinite-loops.ts +++ b/packages/app/src/sandbox/eval/transpilers/babel/worker/plugins/babel-plugin-transform-prevent-infinite-loops.ts @@ -9,7 +9,7 @@ // Based on https://repl.it/site/blog/infinite-loops. -const MAX_ITERATIONS = 10001; +const MAX_ITERATIONS = 100001; export default function infiniteLoopDetector({ types: t, template }) { // We set a global so that we can later fail the test diff --git a/packages/app/src/sandbox/worker/sw.no-webpack.js b/packages/app/src/sandbox/worker/sw.no-webpack.js index fe6076e79a2..fa4347e644e 100644 --- a/packages/app/src/sandbox/worker/sw.no-webpack.js +++ b/packages/app/src/sandbox/worker/sw.no-webpack.js @@ -205,7 +205,7 @@ function getResponse(request) { `Failed to handle ${request.method} ${request.url} request: no response received from the BroadcastChannel within timeout. There's likely an issue with the relay/worker communication.` ) ); - }, 3000); + }, 5000); const requestMessage = { $channel: CHANNEL_NAME,