Skip to content

Commit a4384ac

Browse files
committed
chore: polish
1 parent 3232aa6 commit a4384ac

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

packages/core/src/config.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -737,12 +737,6 @@ const composeBundleConfig = (
737737
// user should use copy to keep origin file or use another separate entry to deal this
738738
let request: string = data.request;
739739

740-
// WARN: escape hatch, we preserve the import start with "!"
741-
// import '!./foo' -> import './foo'
742-
if (request[0] === '!') {
743-
return callback(null, request.slice(1));
744-
}
745-
746740
const cssExternal = cssExternalHandler(
747741
request,
748742
callback,
@@ -762,7 +756,7 @@ const composeBundleConfig = (
762756
if (JS_EXTENSIONS_PATTERN.test(request)) {
763757
request = request.replace(/\.[^.]+$/, jsExtension);
764758
} else {
765-
// If it does not match jsExtensionsPattern or cssExtensionsPattern, we should do nothing, eg: ./foo.png
759+
// If it does not match jsExtensionsPattern, we should do nothing, eg: ./foo.png
766760
return callback();
767761
}
768762
} else {

packages/core/src/css/cssConfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { CSS_EXTENSIONS_PATTERN } from '../constant';
55
import { RemoveCssExtractAssetPlugin } from './RemoveCssExtractAssetPlugin';
66

77
const require = createRequire(import.meta.url);
8-
const CSS_MODULE_REG = /\.module\.\w+$/i;
98

109
export const RSLIB_TEMP_CSS_DIR = '__rslib_css__';
1110

@@ -23,6 +22,7 @@ export function isCssFile(filepath: string): boolean {
2322
return CSS_EXTENSIONS_PATTERN.test(filepath);
2423
}
2524

25+
const CSS_MODULE_REG = /\.module\.\w+$/i;
2626
export function isCssModulesFile(
2727
filepath: string,
2828
auto: CssLoaderOptionsAuto,

packages/core/src/types/config/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export type BannerAndFooter = {
5050
};
5151

5252
export type Redirect = {
53-
// TODO: others
53+
// TODO: support other redirects
5454
// alias?: boolean;
5555
style?: boolean;
5656
// asset?: boolean;

0 commit comments

Comments
 (0)