Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Delete external Sass stylesheets #1096

Closed
wants to merge 3 commits into from
Closed

Delete external Sass stylesheets #1096

wants to merge 3 commits into from

Conversation

zackkrida
Copy link
Member

@zackkrida zackkrida commented Mar 9, 2022

Proof of concept to delete all external stylesheets except app.css, previously styles/tailwind.css. This PR has known visual errors, allowed for the purposes of testing. All edited files besides the nuxt config, and the deleted style files will be reverted prior to undrafting this PR. This PR will be the final piece of the legacy style removal milestone.

I really wanted to test this PR for performance, but it seems difficult. I'll have to use the bundle analyzer and compare the css in our main application chunk. I tried extracting all CSS to a single, cacheable CSS file here, because Tailwind's optimizations and purge rules should result in a pretty lean file, but it sadly didn't work. Nuxt doesn't officially support it and the logic I tried to create a single css chunk in nuxt.config.ts resulted in odd errors. Here's the config I added:

{
build: {
  optimization: {
      // Extract CSS to single named file
      splitChunks: {
        cacheGroups: {
          styles: {
            name: 'styles',
            test: /\.(css|vue)$/,
            chunks: 'all',
            enforce: true,
          },
        },
      },
    },
  }
}

@zackkrida zackkrida changed the title Delete styles Delete external Sass stylesheets Mar 9, 2022
@dhruvkb dhruvkb added the 🚦 status: awaiting triage Has not been triaged & therefore, not ready for work label Mar 9, 2022
components: [
{ path: '~/components', extensions: ['vue'], pathPrefix: false },
],
components: true,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will undo this.

@zackkrida
Copy link
Member Author

I'm going to close this. Once we implement #1088 this will be quite easy, that's the last instance of this we need to resolve.

@zackkrida zackkrida closed this Apr 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🚦 status: awaiting triage Has not been triaged & therefore, not ready for work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants