-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CSS not imported when building for production #87
Comments
@adambullmer any thoughts on this? happy to support you and this project if we can get some help on this. Thanks! |
I ran into the same issue, and was able to solve it by:
// vue.config.js
module.exports = {
filenameHashing: false
...
}
// src/manifest.json
{
...
"content_scripts": [
{
"matches": ["*://*/*"],
"js": ["js/content-script.js"],
"css": ["css/content-script.css"]
}
],
...
} Hope that helps. |
Thanks @JamesDommisse will give this a look! |
@JamesDommisse I did as you said, now my development is broken as during development webpack does not create the css files, is there a way to tell webpack to edit the manifest on production? |
For other people that might end up here, you can add a manifestTransformer function to the plugins options and in that remove the css from contnet_scripts if it's running in development. |
@mmohaveri Do you mind providing a snippet? |
@michaelbukachi you should be able to do this (targeting the second entry of the content_scripts):
|
Thanks. |
Hello, thank you for this great library!
We've been working in development for a while on our browser extension, and now we're ready to start using production builds.
Everything seems to be working perfectly except when we run a production build (
yarn build
) the CSS is not applied to our content script. I can see the css files are generated and placed within a /css folder, but it's like it is never referenced by the javascript.One thing that may be a little different than the standard project is that we are adding a Vue app to the content script.
Is there something else we need to do?
The text was updated successfully, but these errors were encountered: