Skip to content

Update all commands and its flags #219

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

Merged
merged 9 commits into from
Nov 18, 2024
Merged
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
Use require for extension.config.js
Setting it to dynamic imports breaks
the build tests. Current way however
blocks the config file to be ES6-compatible

This fixes tests which is fine for now.
An issue for the future.
  • Loading branch information
cezaraugusto committed Nov 15, 2024
commit 5d00a4244e9e7796ce9567f8f3e0508078d7bc62
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export async function loadCustomWebpackConfig(projectPath: string) {

if (fs.existsSync(userConfigPath)) {
if (await isUsingExperimentalConfig(projectPath)) {
const userConfig: FileConfig = (await import(userConfigPath)).default
const userConfig: FileConfig = require(userConfigPath)
if (userConfig && typeof userConfig.config === 'function') {
return userConfig.config
}
Expand All @@ -28,7 +28,7 @@ export async function loadCommandConfig(

if (fs.existsSync(userConfigPath)) {
if (await isUsingExperimentalConfig(projectPath)) {
const userConfig: FileConfig = (await import(userConfigPath)).default
const userConfig: FileConfig = require(userConfigPath)
if (userConfig) {
// @ts-expect-error - TS doesn't know that command is a key of FileConfig['commands']
return userConfig[command]
Expand All @@ -47,7 +47,7 @@ export async function loadBrowserConfig(

if (fs.existsSync(userConfigPath)) {
if (await isUsingExperimentalConfig(projectPath)) {
const userConfig: FileConfig = (await import(userConfigPath)).default
const userConfig: FileConfig = require(userConfigPath)
if (userConfig && userConfig.browser && userConfig.browser[browser]) {
return userConfig.browser[browser] || {browser: 'chrome'}
}
Expand Down