Skip to content

Commit

Permalink
fix(rspack): remove babel options
Browse files Browse the repository at this point in the history
  • Loading branch information
Coly010 committed Nov 6, 2024
1 parent ac68a4c commit 12dd8ed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 18 deletions.
12 changes: 6 additions & 6 deletions packages/rspack/src/plugins/utils/apply-web-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
EnvironmentPlugin,
} from '@rspack/core';
import { instantiateScriptPlugins } from './instantiate-script-plugins';
import path, { join } from 'path';
import { join, resolve } from 'path';
import { SubresourceIntegrityPlugin } from 'webpack-subresource-integrity';
import { getOutputHashFormat } from './hash-format';
import { normalizeExtraEntryPoints } from './normalize-entry';
Expand Down Expand Up @@ -103,7 +103,7 @@ export function applyWebConfig(
if (options?.stylePreprocessorOptions?.includePaths?.length > 0) {
options.stylePreprocessorOptions.includePaths.forEach(
(includePath: string) =>
includePaths.push(path.resolve(options.root, includePath))
includePaths.push(resolve(options.root, includePath))
);
}

Expand All @@ -120,7 +120,7 @@ export function applyWebConfig(
normalizeExtraEntryPoints(options.styles, 'styles').forEach((style) => {
const resolvedPath = style.input.startsWith('.')
? style.input
: path.resolve(options.root, style.input);
: resolve(options.root, style.input);
// Add style entry points.
if (entries[style.bundleName]) {
entries[style.bundleName].import.push(resolvedPath);
Expand Down Expand Up @@ -178,7 +178,7 @@ export function applyWebConfig(
use: [
...getCommonLoadersForCssModules(options, includePaths),
{
loader: path.join(
loader: join(
__dirname,
'../../../utils/webpack/deprecated-stylus-loader.js'
),
Expand Down Expand Up @@ -241,7 +241,7 @@ export function applyWebConfig(
use: [
...getCommonLoadersForGlobalCss(options, includePaths),
{
loader: path.join(
loader: join(
__dirname,
'../../../utils/webpack/deprecated-stylus-loader.js'
),
Expand Down Expand Up @@ -305,7 +305,7 @@ export function applyWebConfig(
use: [
...getCommonLoadersForGlobalStyle(options, includePaths),
{
loader: path.join(
loader: join(
__dirname,
'../../../utils/webpack/deprecated-stylus-loader.js'
),
Expand Down
13 changes: 1 addition & 12 deletions packages/rspack/src/plugins/utils/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,6 @@ export interface NxAppRspackPluginOptions {
* Assets to be copied over to the output path.
*/
assets?: Array<AssetGlob | string>;
/**
* Babel configuration file if compiler is babel.
*/
babelConfig?: string;
/**
* If true, Babel will look for a babel.config.json up the directory tree.
*/
babelUpwardRootMode?: boolean;
/**
* Set <base href> for the resulting index.html.
*/
Expand All @@ -73,10 +65,7 @@ export interface NxAppRspackPluginOptions {
buildLibsFromSource?: boolean;

commonChunk?: boolean;
/**
* The compiler to use. Default is `babel` and requires a `.babelrc` file.
*/
compiler?: 'babel' | 'swc' | 'tsc';

/**
* Delete the output path before building.
*/
Expand Down

0 comments on commit 12dd8ed

Please sign in to comment.