Skip to content

Instantly share code, notes, and snippets.

@jaimeiniesta
Created October 7, 2021 08:30
Show Gist options
  • Save jaimeiniesta/79dd351e77a7537b7b5c6e908d128ff2 to your computer and use it in GitHub Desktop.
Save jaimeiniesta/79dd351e77a7537b7b5c6e908d128ff2 to your computer and use it in GitHub Desktop.
Maximum call stack size exceeded on Tailwind 2 JIT with esbuild on Phoenix app
@import "./prism.css";
@import "./progressbar.css";
@import "tailwindcss/base";
@import "tailwindcss/components";
@import "tailwindcss/utilities";
@layer components {
/* Pagination */
nav.pagination {
@apply inline-flex;
}
.pagination a {
@apply border border-gray-400 bg-white px-4 py-2 m-1 rounded-sm;
}
.pagination a:hover {
@apply bg-gray-200;
}
a.pagination-active {
@apply bg-blue-700 text-white;
}
a.pagination-active:hover {
@apply bg-black;
}
a.pagination-previous {
@apply rounded-l-lg;
}
a.pagination-next {
@apply rounded-r-lg;
}
/* Tabs */
li.tab {
@apply mr-1 bg-gray-100 bg-opacity-75 rounded-t;
}
li.tab.active {
@apply -mb-px bg-white;
}
li.tab a {
@apply rounded-t inline-block py-2 px-4 text-gray-700 font-semibold cursor-pointer;
}
li.tab.active a {
@apply border-l border-t border-r text-black;
}
li.tab a:hover {
@apply underline text-black;
}
/** Links **/
a.external:hover {
@apply underline;
}
a.external::after {
font-family: FontAwesome;
font-size: .85em;
content: " \f08e";
color: #666;
}
/* Help panels */
.help_panel p {
@apply mb-2;
}
.help_panel ul {
@apply ml-8 list-disc;
}
.help_panel li {
@apply my-4;
}
.help_panel a {
@apply font-semibold;
}
.help_panel a:hover {
@apply underline;
}
.help_panel code.inline {
@apply bg-white px-2 py-1 border rounded-md;
}
.help_panel pre {
@apply m-4;
}
.help_panel blockquote {
@apply m-2 ml-4 italic font-light;
}
/* Spinners */
img.spinner {
width: 15px;
height: 15px;
}
img.spinner_large {
width: 30px;
height: 30px;
}
pre {
@apply m-4 p-4 border border-gray-300 rounded-md shadow-md bg-white;
}
/* Badges */
.white_badge {
@apply inline-block whitespace-nowrap rounded-full shadow-md border border-gray-400 bg-white text-gray-900 text-xs mx-1 mb-2 px-4 py-1 uppercase;
}
/* Buttons */
.simple_button {
@apply bg-white px-3 py-1 rounded-md shadow text-sm;
}
.simple_button:hover {
@apply border-black;
}
.disabled_button {
@apply bg-gray-100 text-gray-700 px-3 py-1 rounded-md shadow text-sm;
}
.failed_button {
@apply bg-gray-900 text-gray-100 px-3 py-1 rounded-md shadow text-sm;
}
.gray_button {
@apply bg-gray-600 text-gray-100 px-3 py-1 rounded-md shadow text-sm;
}
.gray_button:hover {
@apply bg-gray-800 border-gray-800 text-white;
}
.red_button {
@apply bg-red-600 text-red-100 px-3 py-1 rounded-md shadow text-sm;
}
.red_button:hover {
@apply bg-red-800 border-red-800 text-white;
}
.orange_button {
@apply bg-yellow-600 text-yellow-100 px-3 py-1 rounded-md shadow text-sm;
}
.orange_button:hover {
@apply bg-yellow-800 border-yellow-800 text-white;
}
.green_button {
@apply bg-green-600 text-green-100 px-3 py-1 rounded-md shadow text-sm;
}
.green_button:hover {
@apply bg-green-800 border-green-800 text-white;
}
/* Callouts - Tailwind doesnt allow different border colors */
.callout {
border-top-color: lightgrey !important;
border-top-width: 1px !important;
border-bottom-color: lightgrey !important;
border-bottom-width: 1px !important;
border-right-color: lightgrey !important;
border-right-width: 1px !important;
}
/* Blog */
.post-content p {
margin-bottom: 1rem;
@apply leading-relaxed;
}
.post-content a {
@apply text-blue-900 font-semibold;
}
.post-content a:hover {
@apply underline;
}
.post-content h2 {
@apply text-2xl font-semibold mt-8 mb-4;
}
.post-content h3 {
@apply text-xl font-semibold mt-3 mb-2;
}
.post-content ol {
@apply list-decimal my-6 ml-6;
}
.post-content ul {
@apply list-disc my-6 ml-6;
}
.post-content li {
@apply mb-2;
}
.post-content img.screenshot {
@apply border rounded-xl shadow-md mt-2 mb-6 mx-2;
}
.post-content blockquote {
@apply mx-6 pl-4 italic;
border-left-color: brown !important;
border-left-width: 3px !important;
}
/* Form validation */
span.help-block {
@apply text-sm text-red-900 pt-2;
}
/* Background */
.bgpattern-constellation {
background-color: #ffffff;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='368' height='368' viewBox='0 0 800 800'%3E%3Cg fill='none' stroke='%23d2d6d9' stroke-width='1'%3E%3Cpath d='M769 229L1037 260.9M927 880L731 737 520 660 309 538 40 599 295 764 126.5 879.5 40 599-197 493 102 382-31 229 126.5 79.5-69-63'/%3E%3Cpath d='M-31 229L237 261 390 382 603 493 308.5 537.5 101.5 381.5M370 905L295 764'/%3E%3Cpath d='M520 660L578 842 731 737 840 599 603 493 520 660 295 764 309 538 390 382 539 269 769 229 577.5 41.5 370 105 295 -36 126.5 79.5 237 261 102 382 40 599 -69 737 127 880'/%3E%3Cpath d='M520-140L578.5 42.5 731-63M603 493L539 269 237 261 370 105M902 382L539 269M390 382L102 382'/%3E%3Cpath d='M-222 42L126.5 79.5 370 105 539 269 577.5 41.5 927 80 769 229 902 382 603 493 731 737M295-36L577.5 41.5M578 842L295 764M40-201L127 80M102 382L-261 269'/%3E%3C/g%3E%3Cg fill='%23e8e8e8'%3E%3Ccircle cx='769' cy='229' r='8'/%3E%3Ccircle cx='539' cy='269' r='8'/%3E%3Ccircle cx='603' cy='493' r='8'/%3E%3Ccircle cx='731' cy='737' r='8'/%3E%3Ccircle cx='520' cy='660' r='8'/%3E%3Ccircle cx='309' cy='538' r='8'/%3E%3Ccircle cx='295' cy='764' r='8'/%3E%3Ccircle cx='40' cy='599' r='8'/%3E%3Ccircle cx='102' cy='382' r='8'/%3E%3Ccircle cx='127' cy='80' r='8'/%3E%3Ccircle cx='370' cy='105' r='8'/%3E%3Ccircle cx='578' cy='42' r='8'/%3E%3Ccircle cx='237' cy='261' r='8'/%3E%3Ccircle cx='390' cy='382' r='8'/%3E%3C/g%3E%3C/svg%3E");
/* background by SVGBackgrounds.com */
}
/* Browser window */
.dot {
height: 8px;
width: 8px;
border-radius: 50%;
display: inline-block;
}
/* Small (sm) */
@media (min-width: 640px) {
.dot {
height: 10px;
width: 10px;
}
}
/* Medium (md) */
@media (min-width: 768px) {
.dot {
height: 12px;
width: 12px;
}
}
/* Large (lg) */
@media (min-width: 1024px) {
.dot {
height: 13px;
width: 13px;
}
}
/* Terms of service */
div.terms-of-service ul {
@apply list-disc ml-8 mb-6;
}
div.terms-of-service h1 {
@apply font-bold my-6 text-4xl;
}
div.terms-of-service h2 {
@apply font-bold my-6 text-3xl;
}
div.terms-of-service h3 {
@apply font-bold my-6 text-2xl;
}
div.terms-of-service h4 {
@apply font-bold my-6 text-xl;
}
div.terms-of-service p {
@apply leading-6 mb-6;
}
/* Who uses Rocket Validator */
div.references-list ul {
@apply list-disc ml-8 mb-6;
}
div.references-list h2 {
@apply font-bold my-6 text-3xl;
}
div.references-list a:hover {
@apply underline;
}
/* Content */
div.leading-relaxed p {
@apply leading-relaxed mb-4;
}
/* Progressbar */
.score-value {
font-size: 1.4em;
margin-left: .3em;
}
/* Small (sm) */
@media (min-width: 640px) {
.score-value {
font-size: 2em;
}
}
/* Medium (md) */
@media (min-width: 768px) {
.score-value {
font-size: 1em;
}
}
/* Large (lg) */
@media (min-width: 1024px) {
.score-value {
font-size: 1.4em;
}
}
/** Sorting **/
.sorting,
.sorting_asc,
.sorting_desc {
padding: 4px 15px 4px 4px;
cursor: pointer;
}
.sorting {
background: url(data:image/gif;base64,R0lGODlhCwALAJEAAAAAAP///xUVFf///yH5BAEAAAMALAAAAAALAAsAAAIUnC2nKLnT4or00PvyrQwrPzUZshQAOw==) no-repeat center right;
}
.sorting_asc {
background: url(data:image/gif;base64,R0lGODlhCwALAJEAAAAAAP///xUVFf///yH5BAEAAAMALAAAAAALAAsAAAIRnC2nKLnT4or00Puy3rx7VQAAOw==) no-repeat center right;
}
.sorting_desc {
background: url(data:image/gif;base64,R0lGODlhCwALAJEAAAAAAP///xUVFf///yH5BAEAAAMALAAAAAALAAsAAAIPnI+py+0/hJzz0IruwjsVADs=) no-repeat center right;
}
}
/* Alpine.js */
[x-cloak] {
display: none;
}
watchers: [
esbuild: {Esbuild, :install_and_run, [:default, ~w(--sourcemap=inline --watch)]},
npx: [
"tailwindcss",
"--input=css/app.css",
"--output=../priv/static/assets/app.css",
"--postcss",
"--watch",
cd: Path.expand("../assets", __DIR__)
]
]
config :esbuild,
version: "0.12.26",
default: [
args: ~w(js/app.js --bundle --target=es2016 --outdir=../priv/static/assets),
cd: Path.expand("../assets", __DIR__),
env: %{"NODE_PATH" => Path.expand("../deps", __DIR__)}
]
warn - You have enabled the JIT engine which is currently in preview.
warn - Preview features are not covered by semver, may introduce breaking changes, and can change at any time.
Rebuilding...
RangeError: Maximum call stack size exceeded
at processApply (/Users/jaime/code/rocket/rocket-core/rocketvalidator/assets/node_modules/tailwindcss/lib/jit/lib/expandApplyAtRules.js:217:22)
at processApply (/Users/jaime/code/rocket/rocket-core/rocketvalidator/assets/node_modules/tailwindcss/lib/jit/lib/expandApplyAtRules.js:222:5)
at processApply (/Users/jaime/code/rocket/rocket-core/rocketvalidator/assets/node_modules/tailwindcss/lib/jit/lib/expandApplyAtRules.js:222:5)
at processApply (/Users/jaime/code/rocket/rocket-core/rocketvalidator/assets/node_modules/tailwindcss/lib/jit/lib/expandApplyAtRules.js:222:5)
at processApply (/Users/jaime/code/rocket/rocket-core/rocketvalidator/assets/node_modules/tailwindcss/lib/jit/lib/expandApplyAtRules.js:222:5)
at processApply (/Users/jaime/code/rocket/rocket-core/rocketvalidator/assets/node_modules/tailwindcss/lib/jit/lib/expandApplyAtRules.js:222:5)
at processApply (/Users/jaime/code/rocket/rocket-core/rocketvalidator/assets/node_modules/tailwindcss/lib/jit/lib/expandApplyAtRules.js:222:5)
at processApply (/Users/jaime/code/rocket/rocket-core/rocketvalidator/assets/node_modules/tailwindcss/lib/jit/lib/expandApplyAtRules.js:222:5)
at processApply (/Users/jaime/code/rocket/rocket-core/rocketvalidator/assets/node_modules/tailwindcss/lib/jit/lib/expandApplyAtRules.js:222:5)
at processApply (/Users/jaime/code/rocket/rocket-core/rocketvalidator/assets/node_modules/tailwindcss/lib/jit/lib/expandApplyAtRules.js:222:5)
{
"scripts": {
"deploy": "NODE_ENV=production tailwindcss --postcss --minify -i css/app.css -o ../priv/static/assets/app.css"
},
"dependencies": {
"alpinejs": "^3.2.3",
"topbar": "^1.0.1",
"chart.js": "^3.4.1",
"prismjs": "^1.25.0"
},
"devDependencies": {
"autoprefixer": "^10.2.0",
"postcss": "^8.3.5",
"postcss-import": "^14.0.2",
"tailwindcss": "^2.2.4"
}
}
module.exports = {
plugins: {
'postcss-import': {},
tailwindcss: {},
autoprefixer: {},
}
}
module.exports = {
mode: 'jit',
purge: [
"../**/*.md",
"../**/*.html.md",
"../**/*.html.eex",
"../**/*.html.leex",
"../**/*.html.heex",
"../**/views/**/*.ex",
"../**/live/**/*.ex",
"./js/**/*.js"
],
theme: {},
variants: {},
plugins: []
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment