Skip to content

Bump axios from 1.7.9 to 1.8.2 #255

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

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix type in CSS plugin
  • Loading branch information
cezaraugusto committed Apr 5, 2025
commit 88e6fe0c4ea6179123e530bcb45460c5226b87c9
28 changes: 15 additions & 13 deletions programs/develop/webpack/plugin-css/css-in-content-script-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,19 @@ export async function cssInContentScriptLoader(
) {
const manifestPath = path.join(projectPath, 'manifest.json')

return [{
test: /\.css$/,
type: 'asset',
generator: {
// Add contenthash to avoid naming collisions between
// different content script CSS files
filename: 'content_scripts/[name].[contenthash:8].css'
},
issuer: (issuer: string) => isContentScriptEntry(issuer, manifestPath),
use: await commonStyleLoaders(projectPath, {
mode: mode as 'development' | 'production'
})
}]
return [
{
test: /\.css$/,
type: 'asset',
generator: {
// Add contenthash to avoid naming collisions between
// different content script CSS files
filename: 'content_scripts/[name].[contenthash:8].css'
},
issuer: (issuer: string) => isContentScriptEntry(issuer, manifestPath),
use: await commonStyleLoaders(projectPath, {
mode: mode as 'development' | 'production'
})
}
]
}
20 changes: 11 additions & 9 deletions programs/develop/webpack/plugin-css/css-in-html-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ export async function cssInHtmlLoader(
) {
const manifestPath = path.join(projectPath, 'manifest.json')

return {
test: /\.css$/,
type: 'css',
// type: 'css' breaks content scripts so let's avoid it
issuer: (issuer: string) => !isContentScriptEntry(issuer, manifestPath),
use: await commonStyleLoaders(projectPath, {
mode: mode as 'development' | 'production'
})
}
return [
{
test: /\.css$/,
type: 'css',
// type: 'css' breaks content scripts so let's avoid it
issuer: (issuer: string) => !isContentScriptEntry(issuer, manifestPath),
use: await commonStyleLoaders(projectPath, {
mode: mode as 'development' | 'production'
})
}
]
}
4 changes: 2 additions & 2 deletions programs/develop/webpack/plugin-css/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ export class CssPlugin {
// For HTML we need to use the css loader because it's a HTML file
// and we need to load it as a CSS file.
const loaders: RuleSetRule[] = [
await cssInContentScriptLoader(projectPath, mode),
await cssInHtmlLoader(projectPath, mode)
...(await cssInContentScriptLoader(projectPath, mode)),
...(await cssInHtmlLoader(projectPath, mode))
]

// Add Sass/Less support if needed
Expand Down
2 changes: 1 addition & 1 deletion programs/develop/webpack/webpack-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ export default function webpackConfig(
? 'gecko-based'
: devOptions.browser

// Keep hot updates for content scripts in development mode
const cleanConfig = devOptions.output?.clean
? devOptions.output.clean
// Keep hot updates for content scripts in development mode
: devOptions.mode === 'development'

return {
Expand Down
Loading