Skip to content

Commit aa6f63c

Browse files
robmcleishagclaude
andcommitted
fix(gdu): remove temp exclusion and add sourceType unambiguous to babel config
Remove the temporary @autoguru/utilities exclusion that was no longer needed and add sourceType 'unambiguous' to babel-loader options to handle both ES modules and CommonJS files correctly. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent e08c83f commit aa6f63c

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

.changeset/tangy-rivers-care.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"gdu": patch
3+
---
4+
5+
Remove temporary @autoguru/utilities exclusion and add sourceType 'unambiguous' to babel-loader config

packages/gdu/config/webpack/webpack.config.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -344,11 +344,6 @@ export const baseOptions = ({
344344
{
345345
include: ourCodePaths,
346346
exclude(path) {
347-
// TODO: Temp, remove this
348-
if (path.includes('@autoguru/utilities')) {
349-
return true;
350-
}
351-
352347
const ourCode = ourCodePaths.some((item) => {
353348
if (item instanceof RegExp) {
354349
return item.test(path);
@@ -369,6 +364,7 @@ export const baseOptions = ({
369364
cacheDirectory: true,
370365
babelrc: false,
371366
envName: 'production',
367+
sourceType: 'unambiguous',
372368
...hooks.babelConfig.call(
373369
require('../babel-config/production')(
374370
getGuruConfig(),
@@ -390,6 +386,7 @@ export const baseOptions = ({
390386
cacheDirectory: true,
391387
babelrc: false,
392388
envName: 'production',
389+
sourceType: 'unambiguous',
393390
presets: [
394391
[
395392
require.resolve(

packages/gdu/config/webpack/webpack.development.config.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -257,11 +257,6 @@ export const baseDevelopmentOptions = ({
257257
{
258258
include: ourCodePaths,
259259
exclude(path) {
260-
// TODO: Temp, remove this
261-
if (path.includes('@autoguru/utilities')) {
262-
return true;
263-
}
264-
265260
const ourCode = ourCodePaths.some((item) => {
266261
if (item instanceof RegExp) {
267262
return item.test(path);
@@ -282,6 +277,7 @@ export const baseDevelopmentOptions = ({
282277
cacheDirectory: true,
283278
babelrc: false,
284279
envName: 'development',
280+
sourceType: 'unambiguous',
285281
...hooks.babelConfig.call(
286282
require('../babel-config/development')(
287283
getGuruConfig(),
@@ -303,6 +299,7 @@ export const baseDevelopmentOptions = ({
303299
cacheDirectory: true,
304300
babelrc: false,
305301
envName: 'development',
302+
sourceType: 'unambiguous',
306303
presets: [
307304
[
308305
require.resolve(

0 commit comments

Comments
 (0)