Giter Club home page Giter Club logo

Comments (6)

Jonghakseo avatar Jonghakseo commented on May 14, 2024 2

maybe this will help

from chrome-extension-boilerplate-react-vite.

github-actions avatar github-actions commented on May 14, 2024

Thank you for your contribution. We will check and reply to you as soon as possible.

from chrome-extension-boilerplate-react-vite.

JunyWuuuu91 avatar JunyWuuuu91 commented on May 14, 2024

in my case, i create a single style.scss file in content folder,

@import "./styles/xxxx.scss";
@include echo;
// ....

then configure it in vite.config.ts

 rollupOptions: {
      input: {
        // ....
        contentStyle: resolve(pagesDir, "content", "style.scss"),
      },
      output: {
        assetFileNames: "assets/[ext]/[name].chunk.[ext]",
      }
    },

finally, update manifest.ts

content_scripts: [ { css: assets/css/contentStyle.chunk.css, /*...*/ } ]
web_accessible_resources: [ { resources: [ "assets/css/*.css", /*...*/ ] } ]

of cource , u can set css by chrome API

chrome.scripting.insertCSS({
          files: ["assets/css/contentStyle.chunk.css"],
          target: {
            tabId,
          },
        })

from chrome-extension-boilerplate-react-vite.

spencerc99 avatar spencerc99 commented on May 14, 2024

awesome thank you! I got it working by manually compiling into contentStyle.css but wanted to make better use of vite, which this seems to take full advantage of. I'll try this out

from chrome-extension-boilerplate-react-vite.

Jonghakseo avatar Jonghakseo commented on May 14, 2024

@all-contributors please add @spencerc99 for bug

from chrome-extension-boilerplate-react-vite.

allcontributors avatar allcontributors commented on May 14, 2024

@Jonghakseo

I've put up a pull request to add @spencerc99! πŸŽ‰

from chrome-extension-boilerplate-react-vite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.