-
Hello everyone! I'm new here so I'm not sure this is the right place to asj this question. I just created a new project on my machine, it works ok, but I then tried to deploy it inmediately to Netlify, I put "yarn build" as the build command and "output" as the folder for the website. The site gets deployed, but I can not see the styles. In the Deploy's logs, I see this:
My local machine is:
I'd really appreciate some guidance here. I'll try to add tailwind as a next step. Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 10 replies
-
Hey @luctus, the command to build your frontend using webpack along with your site is Also, if you run |
Beta Was this translation helpful? Give feedback.
-
It worked! What an amateur error, sorry for that.
Should I upgrade to the new Bridgetown version then? Any recommended
path?
Those commands seems super awesome! I’ll try them tonight.
Thanks a lot!
|
Beta Was this translation helpful? Give feedback.
-
No worries haha, it happens :)
Yeah I'd definitely recommend upgrading as we're aiming to keep the API fairly stable after v1. There's been quite a few changes from 0.2x to the 1.0 alphas (currently the latest is v1.0.0.alpha9). Here's an upgrade guide from @jaredcwhite that should help you with the upgrade: https://www.bridgetownrb.com/release/era-of-bridgetown-v1#upgrading-from-v02x. |
Beta Was this translation helpful? Give feedback.
-
Hey @ayushn21, it's me again... I'm super amateur with webpack and I struggled a lot because my base site wasn't looking good once deployed (with the purgecss plugin). I finally found that I needed to add an extra configuration to the purgecss.js file in order to make it recognize tailwind classes that contain My final purgecss.js file looks like this: module.exports = {
content: ['frontend/javascript/*.js','.output/*.html','./output/**/*.html'],
defaultExtractor: content => content.match(/[\w-/:\.]+(?<!:)/g) || [], // THIS IS THE NEW LINE
output: "./output/_bridgetown/static/css"
} Do you believe it's a good idea to make sure this line is in place when we run the tailwind configurator? I'd like to give it a try and create a pull request. |
Beta Was this translation helpful? Give feedback.
Hey @luctus, the command to build your frontend using webpack along with your site is
yarn deploy
. If you change your build command to that, it should all work fine. I see you're using v0.21; just also wanted to mention that in v1.0.0 onwards, we don't useyarn
as our taskrunner and the new deploy command isbin/bridgetown deploy
.Also, if you run
bundle exec bridgetown configure netlify
, it will create anetlify.toml
file for you which has all the config in it so you don't need to manually set it up. Also you can set up tailwind usingbundle exec bridgetown configure tailwindcss
(Docs: https://www.bridgetownrb.com/docs/bundled-configurations)