-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
fix(rspack): should be inferred by default #29736
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,6 @@ import { | |
listFiles, | ||
newProject, | ||
readFile, | ||
readJson, | ||
runCLI, | ||
runCLIAsync, | ||
runE2ETests, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,6 @@ import { | |
} from '@nx/devkit'; | ||
import * as pc from 'picocolors'; | ||
import { babelLoaderVersion, nxVersion } from '../../../../utils/versions'; | ||
import { maybeJs } from '../../../../utils/maybe-js'; | ||
import { NormalizedSchema, Schema } from '../../schema'; | ||
|
||
export async function initRspack( | ||
|
@@ -19,38 +18,11 @@ export async function initRspack( | |
const { rspackInitGenerator } = ensurePackage('@nx/rspack', nxVersion); | ||
const rspackInitTask = await rspackInitGenerator(tree, { | ||
...options, | ||
addPlugin: false, | ||
skipFormat: true, | ||
}); | ||
tasks.push(rspackInitTask); | ||
} | ||
|
||
export async function setupRspackConfiguration( | ||
tree: Tree, | ||
options: NormalizedSchema<Schema>, | ||
tasks: any[] | ||
) { | ||
const { configurationGenerator } = ensurePackage('@nx/rspack', nxVersion); | ||
const rspackTask = await configurationGenerator(tree, { | ||
project: options.projectName, | ||
main: joinPathFragments( | ||
options.appProjectRoot, | ||
maybeJs( | ||
{ | ||
js: options.js, | ||
useJsx: true, | ||
}, | ||
`src/main.tsx` | ||
) | ||
), | ||
tsConfig: joinPathFragments(options.appProjectRoot, 'tsconfig.app.json'), | ||
target: 'web', | ||
newProject: true, | ||
framework: 'react', | ||
}); | ||
tasks.push(rspackTask); | ||
} | ||
|
||
Comment on lines
-28
to
-53
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If someone decides they dont want crystal - or their workspace already has There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It will behave the same as Webpack. This should be working unless I missed something during my tests. |
||
export function handleStyledJsxForRspack( | ||
tasks: any[], | ||
tree: Tree, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of just skipping this test, can we actually remove it?