roots / bud

High-performance build system that supports SWC, esbuild, and Babel
https://bud.js.org/
MIT License
339 stars 40 forks source link

[bug] Bud should not ignore exceptions thrown by dependent tooling #2223

Closed montchr closed 1 year ago

montchr commented 1 year ago

Agreement

Describe the issue

If an exception is thrown by a dependent tool, it should cause builds to fail. That's why they throw exceptions. In my particular case, I have an error in tailwind.config.ts which would totally break generated CSS. Bud "ignores" the error and turns it into a short message at the beginning of output, then somehow continues running. If I know that my Tailwind config is broken, then I can assume that the resulting build will render my site in an undesireable state. When bud build intentionally tries to "help" by continuing to run despite the error, I cannot trust it to run without very close monitoring for hidden errors. Because of that, I can't trust it in a CI environment without some way of disabling the default behavior or, better yet, changing the default behavior.

Expected Behavior

Bud should do absolutely nothing to prevent errors/exceptions thrown by dependencies. Exit codes should be preserved. Bud should not make decisions about which configuration files are important.

If some safety-handling is still considered a useful feature for bud, it should absolutely not be the default behavior.

Actual Behavior

With an error in my TailwindCSS configuration, bud build says the following and returns exit code 0:

❯ yarn build
[fs] [tailwind.config.ts] › ⚠  tailwind.config.ts causes an exception when imported.
Since tailwind.config.ts does not appear to be a bud configuration file, bud.js is not throwing. Original error follows:

BudError: Cannot find module '/Users/cdom/Developer/work/projects/logancenter-wp/web/app/themes/logan-center/tailwind.typography' imported from /Users/cdom/Developer/work/projects/logancenter-wp/web/app/themes/logan-center/afa0609c6fb820e511dec42a5cfe2b4911fe4db9d8599a0d-bed2-4fb5-914f-02e6a4dc7891.js
...

Steps To Reproduce

  1. Introduce an error in some config file (tailwind.config.ts in my case)
  2. bud build
  3. echo $?

version

6.12.0

Logs

[env] › ▶  sourcing .env values Initialized timer...
[env] › registering values /Users/cdom/Developer/work/projects/logancenter-wp/.env
[env] › registering expanded values /Users/cdom/Developer/work/projects/logancenter-wp/.env
[env] › ◼  sourcing .env values Timer run for: 2ms
[fs] › ▶  Initializing filesystem Initialized timer...
[fs] › ▶  loading .eslintrc.cjs Initialized timer...
[fs] › ◼  loading .eslintrc.cjs Timer run for: 0ms
[fs] › ▶  loading stylelint.config.cjs Initialized timer...
[fs] › ◼  loading stylelint.config.cjs Timer run for: 0ms
[fs] › ▶  loading tailwind.config.ts Initialized timer...
[fs] › ▶  loading tailwind.typography.ts Initialized timer...
[fs] [tailwind.config.ts] › ⚠  tailwind.config.ts causes an exception when imported.
Since tailwind.config.ts does not appear to be a bud configuration file, bud.js is not throwing. Original error follows:

BudError: Cannot find module '/Users/cdom/Developer/work/projects/logancenter-wp/web/app/themes/logan-center/tailwind.typography' imported from /Users/cdom/Developer/work/projects/logancenter-wp/web/app/themes/logan-center/afa0609c6fb820e511dec42a5cfe2b4911fe4db9d8599a0d-bed2-4fb5-914f-02e6a4dc7891.js
[fs] › ◼  Initializing filesystem Timer run for: 18ms
[bootstrap] › 🏗️ building logan-center
[bootstrap] › 📂 basedir /Users/cdom/Developer/work/projects/logancenter-wp/web/app/themes/logan-center
[bootstrap] › 😎 version 6.12.0
[logan-center] › ▶  initialize Initialized timer...
[logan-center] › bud.env ← @roots/bud/services/env
[logan-center] › bud.project ← @roots/bud/services/project
[logan-center] › bud.consoleBuffer ← @roots/bud-framework/services/console
[logan-center] › bud.extensions ← @roots/bud-extensions
[logan-center] › bud.hooks ← @roots/bud-hooks
[logan-center] › bud.dashboard ← @roots/bud-dashboard
[logan-center] › bud.compiler ← @roots/bud-compiler
[logan-center] › bud.cache ← @roots/bud-cache
[logan-center] › bud.build ← @roots/bud-build
[logan-center] › bud.notifier ← @roots/bud-framework/services/notifier
[logan-center] › bud.api ← @roots/bud-api
[logan-center] [hooks] › ▶  bootstrap Initialized timer...
[logan-center] [hooks] › …  executing callback 1/2
[logan-center] [hooks] › …  executing callback 2/2
[logan-center] [hooks] › ✔  executing callback 1/2
[logan-center] [hooks] › ✔  executing callback 2/2
[logan-center] [hooks] › ◼  bootstrap Timer run for: 1ms
[logan-center] [hooks] › ▶  register  Initialized timer...
[logan-center] [hooks] › …  executing callback 1/3
[logan-center] [hooks] › …  executing callback 2/3
[logan-center] [hooks] › …  executing callback 3/3
[logan-center] [hooks] › ✔  executing callback 1/3
[logan-center] [hooks] › ✔  executing callback 2/3
[logan-center] [hooks] › ✔  executing callback 3/3
[logan-center] [hooks] › ◼  register  Timer run for: 2ms
[logan-center] [hooks] › ▶  boot      Initialized timer...
[logan-center] [hooks] › …  executing callback 1/1
[logan-center] [hooks] › ✔  executing callback 1/1
[logan-center] [hooks] › ◼  boot      Timer run for: 20ms
[logan-center] [hooks] › ▶  booted    Initialized timer...
[logan-center] [hooks] › …  executing callback 1/2
[logan-center] [hooks] › …  executing callback 2/2
[logan-center] [extensions] › ✔  set @roots/bud-cache/invalidate-cache
[logan-center] [@roots/bud-cache/invalidate-cache] › ✔  registered
[logan-center] › ✔  cache initialized
[logan-center] [hooks] › ✔  executing callback 2/2
[logan-center] [extensions] › ✔  set @roots/bud-extensions/esm
[logan-center] [extensions] › ✔  set @roots/bud-extensions/cdn
[logan-center] [extensions] › ✔  set @roots/bud-extensions/mini-css-extract-plugin
[logan-center] [extensions] › ✔  set @roots/bud-extensions/interpolate-html-webpack-plugin
[logan-center] [extensions] › ✔  set @roots/bud-extensions/html-webpack-plugin
[logan-center] [extensions] › ✔  set @roots/bud-extensions/webpack-hot-module-replacement-plugin
[logan-center] [extensions] › ✔  set @roots/bud-extensions/webpack-define-plugin
[logan-center] [extensions] › ✔  set @roots/bud-extensions/webpack-provide-plugin
[logan-center] [extensions] › ✔  set @roots/bud-extensions/fix-style-only-entrypoints
[logan-center] [extensions] › ✔  set @roots/bud-extensions/clean-webpack-plugin
[logan-center] [extensions] › ✔  set @roots/bud-extensions/copy-webpack-plugin
[logan-center] [extensions] › ✔  set @roots/bud-extensions/webpack-manifest-plugin
[logan-center] [extensions] › ✔  set @roots/bud-terser/css-minimizer
[logan-center] [extensions] › ✔  set @roots/bud-terser
[logan-center] [extensions] › ✔  set @roots/bud-entrypoints
[logan-center] [extensions] › ✔  set @roots/bud-prettier
[logan-center] [extensions] › ✔  set @roots/bud-stylelint
[logan-center] [extensions] › ✔  set @roots/bud-swc
[logan-center] [extensions] › ✔  set @roots/bud-eslint
[logan-center] [extensions] › ✔  set @roots/bud-typescript/typecheck
[logan-center] [extensions] › ✔  set @roots/bud-typescript
[logan-center] [extensions] › ✔  set @roots/bud-imagemin/svgo
[logan-center] [extensions] › ✔  set @roots/bud-postcss
[logan-center] [extensions] › ✔  set @roots/bud-tailwindcss
[logan-center] [extensions] › ✔  set @roots/bud-imagemin/sharp
[logan-center] [extensions] › ✔  set @roots/bud-imagemin
[logan-center] [extensions] › ✔  set @roots/sage/acorn
[logan-center] [extensions] › ✔  set @roots/sage/blade-loader
[logan-center] [extensions] › ✔  set @roots/bud-preset-recommend
[logan-center] [extensions] › ✔  set @roots/bud-wordpress-theme-json
[logan-center] [extensions] › ✔  set @roots/bud-react/react-refresh
[logan-center] [extensions] › ✔  set @roots/bud-react
[logan-center] [extensions] › ✔  set @roots/bud-wordpress-externals
[logan-center] [extensions] › ✔  set @roots/bud-wordpress-dependencies
[logan-center] [extensions] › ✔  set @roots/bud-wordpress-manifests
[logan-center] [extensions] › ✔  set @roots/bud-preset-wordpress
[logan-center] [extensions] › ✔  set @roots/sage
[logan-center] [@roots/bud-extensions/webpack-define-plugin] › ✔  registered
[logan-center] [@roots/bud-swc] › ✔  registered
[logan-center] [@roots/bud-eslint] › ✔  registered
[logan-center] [@roots/bud-typescript/typecheck] › ✔  registered
[logan-center] [@roots/bud-typescript] › ✔  registered
[logan-center] [@roots/bud-imagemin/svgo] › ✔  registered
[logan-center] [@roots/bud-postcss] › ✔  registered
[logan-center] [@roots/bud-imagemin/sharp] › ✔  registered
[logan-center] [@roots/bud-imagemin] › ✔  registered
[logan-center] [@roots/sage/blade-loader] › ✔  registered
[logan-center] [@roots/bud-preset-recommend] › ✔  registered
[logan-center] › { key: '@src', value: 'resources', normal: 'resources' }
[logan-center] › @src set to resources
[logan-center] › { key: '@fonts', value: '@src/fonts', normal: 'resources/fonts' }
[logan-center] › @fonts set to resources/fonts
[logan-center] › { key: '@images', value: '@src/images', normal: 'resources/images' }
[logan-center] › @images set to resources/images
[logan-center] › { key: '@scripts', value: '@src/scripts', normal: 'resources/scripts' }
[logan-center] › @scripts set to resources/scripts
[logan-center] › { key: '@styles', value: '@src/styles', normal: 'resources/styles' }
[logan-center] › @styles set to resources/styles
[logan-center] › { key: '@views', value: '@src/views', normal: 'resources/views' }
[logan-center] › @views set to resources/views
[logan-center] › { key: '@dist', value: 'public', normal: 'public' }
[logan-center] › @dist set to public
[logan-center] [@roots/sage] › ✔  registered
[logan-center] › ✔  minimize true
[logan-center] › ✔  file hashing enabled
[logan-center] [@roots/bud-swc] › ✔  booted
[logan-center] [@roots/bud-tailwindcss] › ✔  postcss configured for tailwindcss
[logan-center] [@roots/bud-tailwindcss] › ✔  booted
[logan-center] [@roots/bud-react] › ✔  booted
[logan-center] [extensions] › ✔  set @roots/bud-tailwindcss-theme-json
[logan-center] [@roots/bud-tailwindcss-theme-json] › ✔  registered
[logan-center] [@roots/bud-preset-wordpress] › ✔  booted
[logan-center] [hooks] › ✔  executing callback 1/2
[logan-center] [hooks] › ◼  booted    Timer run for: 319ms
[logan-center] › processing base configuration bud.config.ts
[logan-center] › processing as dynamic configuration: bud.config.ts
[fs] › ▶  loading bud.config.ts Initialized timer...
[logan-center] [api] › ✔  bud.copy: 1 asset patterns added
[logan-center] [hooks] › ▶  config.after Initialized timer...
[logan-center] [hooks] › …  executing callback 1/1
[logan-center] [@roots/bud-swc] › configAfter
[logan-center] [@roots/bud-imagemin/svgo] › configAfter
[logan-center] [@roots/bud-imagemin/sharp] › configAfter
[logan-center] [hooks] › ✔  executing callback 1/1
[logan-center] [hooks] › ◼  config.after Timer run for: 1ms
[logan-center] [compiler] › imported webpack 5.76.3
[logan-center] [build] › bud.build.make called
[logan-center] [hooks] › ▶  build.before Initialized timer...
[logan-center] [hooks] › …  executing callback 1/2
[logan-center] [hooks] › …  executing callback 2/2
[logan-center] [hooks] › ✔  executing callback 2/2
[logan-center] [hooks] › ✔  executing callback 1/2
[logan-center] [hooks] › ◼  build.before Timer run for: 40ms
[logan-center] [@roots/bud-terser/css-minimizer] › ✔  css-minimizer added to minimizers
[logan-center] [@roots/bud-terser] › ✔  terser added to minimizers [
  ImageMinimizerPlugin {
    options: {
      minimizer: [Object],
      generator: undefined,
      severityError: undefined,
      exclude: undefined,
      include: undefined,
      loader: true,
      concurrency: undefined,
      test: /\.svg$/,
      deleteOriginalAssets: true
    }
  },
  ImageMinimizerPlugin {
    options: {
      minimizer: [Object],
      generator: undefined,
      severityError: undefined,
      exclude: undefined,
      include: undefined,
      loader: true,
      concurrency: undefined,
      test: /\.(png|jpe?g|gif|webp)$/,
      deleteOriginalAssets: true
    }
  },
  ImageMinimizerPlugin {
    options: {
      minimizer: undefined,
      generator: [Array],
      severityError: undefined,
      exclude: undefined,
      include: undefined,
      loader: true,
      concurrency: undefined,
      test: /\.(jpe?g|png|gif|tif|webp|svg|avif|jxl)$/i,
      deleteOriginalAssets: true
    }
  },
  CssMinimizerPlugin {
    options: {
      test: /\.css(\?.*)?$/i,
      warningsFilter: [Function: warningsFilter],
      parallel: true,
      include: undefined,
      exclude: undefined,
      minimizer: [Object]
    }
  },
  TerserPlugin {
    options: {
      test: /\.[cm]?js(\?.*)?$/i,
      extractComments: false,
      parallel: true,
      include: undefined,
      exclude: undefined,
      minimizer: [Object]
    }
  }
]
[logan-center] [@roots/bud-extensions/mini-css-extract-plugin] › ✔  produced webpack plugin
[logan-center] [@roots/bud-extensions/fix-style-only-entrypoints] › ✔  produced webpack plugin
[logan-center] [@roots/bud-extensions/clean-webpack-plugin] › ✔  produced webpack plugin
[logan-center] [@roots/bud-extensions/copy-webpack-plugin] › ✔  produced webpack plugin
[logan-center] [@roots/bud-extensions/webpack-manifest-plugin] › ✔  produced webpack plugin
[logan-center] [@roots/bud-entrypoints] › ✔  produced webpack plugin
[logan-center] [@roots/bud-stylelint] › ✔  produced webpack plugin
[logan-center] [@roots/bud-eslint] › ✔  produced webpack plugin
[logan-center] [@roots/sage/blade-loader] › ✔  produced webpack plugin
[logan-center] [@roots/bud-wordpress-externals] › ✔  produced webpack plugin
[logan-center] [@roots/bud-wordpress-dependencies] › ✔  produced webpack plugin
[logan-center] [@roots/bud-wordpress-manifests] › ✔  produced webpack plugin
[logan-center] [build] › ✔  built bail
[logan-center] [build] › ✔  built cache
[logan-center] [build] › ✔  built context
[logan-center] [build] › ✔  built dependencies
[logan-center] [build] › ✔  built devtool
[logan-center] [build] › ✔  built entry
[logan-center] [build] › ✔  built externalsType
[logan-center] [build] › ✔  built infrastructureLogging
[logan-center] [build] › ✔  built mode
[logan-center] [build] › ✔  built module
[logan-center] [build] › ✔  built name
[logan-center] [build] › ✔  built node
[logan-center] [build] › ✔  built optimization
[logan-center] [build] › ✔  built output
[logan-center] [build] › ✔  built parallelism
[logan-center] [build] › ✔  built performance
[logan-center] [build] › ✔  built recordsPath
[logan-center] [build] › ✔  built snapshot
[logan-center] [build] › ✔  built stats
[logan-center] [build] › ✔  built target
[logan-center] [build] › ✔  built plugins
[logan-center] [build] › ✔  built resolve
[logan-center] [build] › ✔  configuration successfully built
[logan-center] [hooks] › ▶  build.after Initialized timer...
[logan-center] [hooks] › …  executing callback 1/2
[logan-center] [hooks] › …  executing callback 2/2
[logan-center] [hooks] › ✔  executing callback 1/2
[logan-center] [hooks] › ✔  executing callback 2/2
[logan-center] [hooks] › ◼  build.after Timer run for: 2ms
[logan-center] [compiler] › ◼  initialize Timer run for: 589ms
[logan-center] [compiler] › …  compilation
[webpack] › [webpack.cache.PackFileCacheStrategy] restore cache container: 821.120834 ms
[webpack] › [webpack.cache.PackFileCacheStrategy] check build dependencies: 47.016 ms
[webpack] › [webpack.cache.PackFileCacheStrategy] restore cache content metadata: 0.813833 ms
[webpack] › [webpack.cache.PackFileCacheStrategy] starting to restore cache content 0 (33 MiB) because of request to: ResolverCachePlugin|normal|default|dependencyType=|esm|path=|/Users/cdom/Developer/work/projects/logancenter-wp/web/app/themes/logan-center/resources|request=|@scripts/app
[webpack] › [webpack.cache.PackFileCacheStrategy] restore cache content 0 (33 MiB): 33.456292 ms
[webpack] › [webpack.cache.PackFileCacheStrategy] starting to restore cache content 1 (227 KiB) because of request to: Compilation/modules|/Users/cdom/Developer/work/projects/logancenter-wp/web/app/themes/logan-center/node_modules/mini-css-extract-plugin/dist/loader.js??minicss!/Users/cdom/Developer/work/projects/logancenter-wp/web/app/themes/logan-center/node_modules/@roots/bud-support/lib/css-loader/index.cjs??css!/Users/cdom/Developer/work/projects/logancenter-wp/web/app/themes/logan-center/node_modules/postcss-loader/dist/cjs.js??postcss!/Users/cdom/Developer/work/projects/logancenter-wp/web/app/themes/logan-center/resources/styles/app.css
[webpack] › [webpack.cache.PackFileCacheStrategy] restore cache content 1 (227 KiB): 12.859417 ms
[webpack] › [IdleFileCachePlugin] Initial cache was generated and cache will be persisted in 0s.

╭─ logan-center ./public [651b8006a7ab0b071462]
│
├─ entrypoints
│  ├─ app
│  │  ├─ js/runtime.eec75c.js     1.07 kB
│  │  ├─ js/259.b55056.js       307 bytes
│  │  ├─ js/186.32e597.js        53.96 kB
│  │  ├─ css/app.96bb80.css      38.56 kB
│  │  └─ js/app.19e546.js       598 bytes
│  └─ editor
│     ├─ js/runtime.eec75c.js     1.07 kB
│     ├─ js/259.b55056.js       307 bytes
│     ├─ css/editor.d00a54.css   39.15 kB
│     └─ js/editor.60fd43.js    513 bytes
│
├─ assets
... [redacted] ...
│
│ … 39 additional asset(s) not shown
│
╰─ compiled 15 modules in 1s 771ms

[logan-center] [hooks] › ▶  compiler.close Initialized timer...
[logan-center] [hooks] › …  executing callback 1/2
[logan-center] [hooks] › …  executing callback 2/2
[logan-center] [hooks] › ✔  executing callback 1/2
[fs] › ▶  writing new checksums Initialized timer...
[fs] › ◼  writing new checksums Timer run for: 2ms
[logan-center] [hooks] › ✔  executing callback 2/2
[logan-center] [hooks] › ◼  compiler.close Timer run for: 6ms
4.73s user 0.70s system 158% cpu 3.421s total

Configuration

No response

Relevant .budfiles

No response

kellymears commented 1 year ago

bud.js doesn't ignore errors thrown by build dependencies.

The warning message you're seeing is emitted during bootstrapping when bud.js attempts to import config modules. At this very early stage bud.js will proceed even if a module can't be imported unless the module has bud in its filename. Since bud.js requires zero configuration it is important to throw early if a bud config is messed up. Otherwise, assuming zero config requirements are met (an entrypoint at @src/index.js), the build could succeed without any user config actually being applied.

In the case of a tailwind.config.js or tailwind.config.ts file with a syntax or import error, yes, bud.js will move beyond bootstrapping even without the module having been successfully loaded. But, tailwindcss/postcss should still throw. bud.js does nothing to mask a build error here.

For example, let's say we add a bad import statement:

import foo from './foo.js'; // does not exist

const config = {
  content: ['./index.php', './app/**/*.php', './resources/**/*.{php,vue,js}'],
  theme: {
    extend: {
      colors: {},
    },
  },
  plugins: [foo],
};

export default config;

As you point out, we can see that bud can't import this module but still keeps going:

[env] › registering expanded values /Users/kellymears/code/git/roots/docker/bedrock/web/app/themes/sage/.env
[env] › ◼  sourcing .env values Timer run for: 3ms
[fs] › ▶  Initializing filesystem Initialized timer...
[fs] › ▶  loading .pnpmfile.cjs Initialized timer...
[fs] › ◼  loading .pnpmfile.cjs Timer run for: 1ms
[fs] › ▶  loading tailwind.config.js Initialized timer...
[fs] [tailwind.config.js] › ⚠  tailwind.config.js causes an exception when imported.
Since tailwind.config.js does not appear to be a bud configuration file, bud.js is not throwing. Original error follows:

BudError: Cannot find module '/Users/kellymears/code/git/roots/docker/bedrock/web/app/themes/sage/foo.js' imported from /Users/kellymears/code/git/roots/docker/bedrock/web/app/themes/sage/tailwind.config.js
[fs] › ◼  Initializing filesystem Timer run for: 11ms
[bootstrap] › 🏗️ building sage

However, the build itself fails because tailwind throws:

╭─ ✘ sage ./public [5ecab747f4778a527a32]
│
├─ ✘  error
│
│  Cannot find module './foo.js'
│ Require stack:
│ - ./tailwind.config.ts
│
│
├─ ✘  error
│
│  Cannot find module './foo.js'
│ Require stack:
│ - ./tailwind.config.ts
│
│
├─ entrypoints
│  ├─ app
│  │  ├─ js/runtime.06fab3.js    1.05 kB
│  │  ├─ js/407.814868.js      314 bytes
│  │  └─ js/app.c4614b.js        8.17 kB
│  └─ editor
│     ├─ js/runtime.06fab3.js    1.05 kB
│     ├─ js/407.814868.js      314 bytes
│     └─ js/editor.fa098a.js      8.4 kB
│
╰─ compiled 12 modules in 537ms

[sage] [hooks] › ▶  compiler.close Initialized timer...
[sage] [hooks] › …  executing callback 1/2
[sage] [hooks] › …  executing callback 2/2
[sage] [hooks] › ✔  executing callback 1/2
[fs] › ▶  writing new checksums Initialized timer...
[fs] › ◼  writing new checksums Timer run for: 0ms
[sage] [hooks] › ✔  executing callback 2/2
[sage] [hooks] › ◼  compiler.close Timer run for: 3ms
error Command failed with exit code 1.

I think this is the correct behavior. A person may have a module lying around in the root of their project that is broken and cannot be imported. It shouldn't cause a total failure unless:

  1. the tooling depends on the module and throws an error
  2. a bud extension depends on the module and throws an error

An example of the second case is calling bud.wpjson.useTailwindColors() or a similar function. In this case we see a different error:

[sage] › processing base configuration bud.config.js
[sage] › processing as dynamic configuration: bud.config.js
[fs] › ▶  loading bud.config.js Initialized timer...
[fs] › ◼  loading bud.config.js Timer run for: 0ms

ConfigError

✘ Error in bud.config.js

BudError

✘ Cannot read properties of undefined (reading 'default')

☰ Stack trace
    at get config [as config] (node_modules/@roots/bud-tailwindcss/lib/extension/index.js:46:48)
    at BudTailwindCss.resolveThemeValue (node_modules/@roots/bud-tailwindcss/lib/extension/index.js:61:39)
    at WordPressThemeJSON.useTailwindColors
(node_modules/@roots/bud-tailwindcss-theme-json/lib/extension.js:24:78)
    at default (bud.config.js:62:6)

ℹ See file /Users/kellymears/code/git/roots/docker/bedrock/web/app/themes/sage/bud.config.js

error Command failed with exit code 1.

I can't reproduce a JS runtime error originating from the tailwind config that doesn't cause the process to exit with a non-zero error code. Do you mind sharing the tailwind config that should throw but doesn't?

montchr commented 1 year ago

Thanks for the detailed response. Based on your logs, it certainly looks like Bud is doing what I would expect.

I'll follow up soon with a minimal example if I can re-reproduce the issue. After changing course away from attempting to importing a module (which did actually exist), I found that some of my changes to the Tailwind config were being heavily cached. I suspect that this caching issue may have prevented Tailwind from throwing an error properly.

For context, this happened when attempting to override the CSS output by the Tailwind Typography plugin, which generally needs to be done in the config file. That caching caused a lot of frustration but after realizing what was going on I made sure to clear cache and built assets each time I made a change (very slow, do not recommend).

kellymears commented 1 year ago

The issue you encountered with the sticky tailwind config caching is addressed in 6.12.1.