@atomicsmash/compiler 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +7 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -40,9 +40,15 @@ const MODE = process.env.NODE_ENV === "development" || process.env.NODE_ENV ===
40
40
  : "production";
41
41
  const srcFolder = resolvePath(argv.in);
42
42
  const distFolder = resolvePath(argv.out);
43
+ // @ts-expect-error -- Module doesn't need to be installed in compiler package.
44
+ const tailwindPostCSSPlugin = await import("@tailwindcss/postcss")
45
+ .then(() => ["@tailwindcss/postcss"])
46
+ .catch(async () =>
47
+ // @ts-expect-error -- Module doesn't need to be installed in compiler package.
48
+ await import("tailwindcss").then(() => ["tailwindcss"]).catch(() => []));
43
49
  const postCSSConfig = [
44
50
  [
45
- "tailwindcss",
51
+ ...tailwindPostCSSPlugin,
46
52
  "postcss-preset-env",
47
53
  {
48
54
  stage: 2,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@atomicsmash/compiler",
3
3
  "type": "module",
4
- "version": "0.2.0",
4
+ "version": "0.2.1",
5
5
  "description": "A universal compiler for all Atomic Smash projects.",
6
6
  "keywords": [
7
7
  "cli",