Skip to content

Conversation

@jankapunkt
Copy link
Member

This PR removes the Fibers dependency and uses async/await instead.

Also fixes package dependency conflicts.

Note: I could have rewritten a lot to ES6 and bump NPM dependencies but I would rather do that in the next PRs.

@filipenevola
Copy link
Contributor

Am I crazy, or does Meteor itself already support postcss? AFAIK it's already supported without external packages, see this PR from zodern.

@jankapunkt
Copy link
Member Author

😵 why didn't I know this... is this mentioned in the docs? Anyway I just did it as a sideeffect for a migration article (which you will see soon 😆) but I think for the sake of support we should make this package at least compatible with 3.0.

Maybe adding a warning or something with hint to the respective docs page?

@filipenevola
Copy link
Contributor

Ok, good that I'm not crazy hehe

I think this package is no longer necessary so it should display a warning about that fact so people can use the standard one. I don't think we should have a version of it for Meteor 3.

@jankapunkt
Copy link
Member Author

I just tested with the tailwind example that I updated to 3.0 Alpha 19 - you can't simply remove this and add minifier-css-postcss as it throws

   * meteor@2.0.0-alpha300.19 <- minifier-css 2.0.0-alpha300.19 <- minifier-css-postcss 1.0.0-beta261.1
   Conflict: Constraint minifier-css@1.6.0 is not satisfied by minifier-css 2.0.0-alpha300.19.
   Constraints on package "minifier-css":
   * minifier-css@~2.0.0-alpha300.19 <- top level
   * minifier-css@1.6.0 <- minifier-css-postcss 1.0.0-beta261.1
=> Your application has errors. Waiting for file change.

@filipenevola
Copy link
Contributor

filipenevola commented Dec 6, 2023

CodeFTW uses tailwind and it's working.

Packages:

meteor-base@1.5.2-alpha300.19
mobile-experience@1.1.1-alpha300.19
mongo@2.0.0-alpha300.19
reactive-var@1.0.13-alpha300.19

standard-minifier-js@3.0.0-alpha300.19
es5-shim@4.8.1-alpha300.19
ecmascript@0.16.8-alpha300.19
typescript@4.9.5-alpha300.19
shell-server@0.6.0-alpha300.19
static-html@1.3.3-alpha300.19
server-render@0.4.2-alpha300.19
accounts-passwordless@3.0.0-alpha300.19
hot-module-replacement@0.5.4-alpha300.19
dev-error-overlay@0.1.3-alpha300.19

react-meteor-data
standard-minifier-css@1.9.3-alpha300.19
fetch@0.1.4-alpha300.19

quave:collections
quave:email-postmark
quave:accounts-passwordless-react
quave:logged-user-react
quave:react-data
quave:admin
quave:synced-cron
quave:slingshot
quave:migrations

release: METEOR@3.0-alpha.19

Tailwind.config.js

/** @type {import('tailwindcss').Config} */
/* eslint-disable */

module.exports = {
  content: [
    './imports/**/*.{js,jsx,ts,tsx}',
    './client/**/*.{js,jsx,ts,tsx}',
    './client/*.html',
  ],
  theme: {
    extend: {
      colors: {
        primary: {
          50: '#F2F8ED',
          100: '#E5F0DB',
          200: '#CBE1B7',
          300: '#B1D293',
          400: '#98C36F',
          500: '#80B54D',
          600: '#65903C',
          700: '#4B6C2D',
          800: '#32481E',
          900: '#182111',
        },
        neutral: {
          100: '#F8F9FA',
          150: '#F0F1F3',
          200: '#E1E3E8',
          300: '#CBCFD6',
          500: '#4B5563',
          600: '#424B58', // T
        },
      },
    },
  },
  plugins: [
    require('@tailwindcss/typography'),
    require('@tailwindcss/line-clamp'),
    require('@tailwindcss/forms'),
  ],
};

.postcssrc.js

module.exports = (ctx) => {
  // This flag is set when loading configuration by this package.
  if (ctx.meteor) {
    const config = {
      plugins: {
        tailwindcss: {},
        autoprefixer: {},
      },
    };

    if (ctx.env === 'production') {
      // "autoprefixer" is reported to be slow,
      // so we use it only in production.
      config.plugins.autoprefixer = {
        overrideBrowserslist: ['defaults'],
      };
    }

    return config;
  } else {
    return {};
  }
};

@filipenevola
Copy link
Contributor

Quave's meteor-template as well https://github.com/quavedev/meteor-template/tree/meteor-3

@filipenevola
Copy link
Contributor

@jankapunkt were you able to find the problem in your example project?

@gustawdaniel
Copy link

Are there any blockers to merge this and release a new version?

@StorytellerCZ
Copy link
Member

@jankapunkt what is the status here? If everything is fine on your end I'm happy to release.

@harryadel
Copy link
Member

cc @jankapunkt @StorytellerCZ Can we a beta release that's compatible with the latest RC?

@jankapunkt
Copy link
Member Author

So i cannot publish due to an error I don't understand:

=> Errors while initializing project:         
                                              
While loading plugin `minifier-postcss` from package `juliancwirko:postcss`:
packages/modules-runtime.js:222:12: Cannot find module 'postcss'
at makeMissingError (packages/modules-runtime.js:222:12)
at Module.require (packages/modules-runtime.js:241:17)
at Module.moduleLink
(/home/jankapunkt/.meteor/packages/modules/.0.20.0.17ptybp.ylkxi++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/@meteorjs/reify/lib/runtime/index.js:52:22)
at packages/minifier-postcss/plugin/minify-css.js:1:21
at module (packages/minifier-postcss/plugin/minify-css.js:260:2)
at fileEvaluate (packages/modules-runtime.js:336:7)
at Module.require (packages/modules-runtime.js:238:14)
at require (packages/modules-runtime.js:258:21)
at <runJavaScript-21>:301:1
at <runJavaScript-21>:306:3

Seems to be related to #15 but I don't know how to get around this

@acemtp
Copy link

acemtp commented May 6, 2024

Ok, good that I'm not crazy hehe

I think this package is no longer necessary so it should display a warning about that fact so people can use the standard one. I don't think we should have a version of it for Meteor 3.

We moved our tailwind project from meteor 2 with juliancwirko:postcss to meteor 3.0rc0 with standard-minifier-css successfully.

So instead, I think this package should be removed from Meteor-Community-Packages to avoid even more confusion or at least in tell in the doc that it's not needed with meteor 3 with a link to the doc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants