Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

flyyer-cli@next: Move from Parcel 1 to Parcel 2 #17

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open

Conversation

lopezjurip
Copy link
Member

@lopezjurip lopezjurip commented Sep 13, 2021

This major change upgrades Parcel 1 to the latest RC build of Parcel 2. This is still experimental but it's worth the try to improve TailwindCSS compatibility and more.

Example project using this new version: https://github.com/useflyyer/flyyer-marketplace-angled

Upgrade

Note: importing .svg is failing ⚠️

To install in your project created with create-flyyer-app run:

yarn add --dev @flyyer/cli@next
yarn add @flyyer/proxy@latest

# Add this explicit dependencies if you have issues with just the previous command
yarn add --dev @parcel/config-default @parcel/transformer-image

To debug info execute with DEBUG=* environment variable. Eg: $ DEBUG=* yarn start

TypeScript

If for some reason you are having problems with TypeScript please modify your tsconfig file:

{
  "compilerOptions": {
    ...
+    "target": "esnext",
+    "moduleResolution": "node",
    ...
  }
}

Tailwind CSS

Upgrade your Tailwind setup:

yarn remove @fullhuman/postcss-purgecss @tailwindcss/postcss7-compat
yarn add --dev tailwindcss@latest postcss@latest autoprefixer@latest

Enable JIT mode:

// tailwind.config.js
module.exports = {
  mode: 'jit',
  purge: [
    './.flyyer-processed/**/*.{html,js,jsx,ts,tsx,vue,vuex,css,scss,sass,less}',
    './templates/**/*.{html,js,jsx,ts,tsx,vue,vuex,css,scss,sass,less}',
    './components/**/*.{html,js,jsx,ts,tsx,vue,vuex,css,scss,sass,less}',
    './styles/**/*.{html,js,jsx,ts,tsx,vue,vuex,css,scss,sass,less}'
  ],
  // ...
};

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant