Skip to content

Commit 64fc8af

Browse files
committed
fix(stylus-modules): fix 'module' has already been declared issue.
1 parent f739e21 commit 64fc8af

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

packages/stylus-modules/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"src"
2020
],
2121
"scripts": {
22+
"build": "tsbb build --no-esm",
2223
"watch": "tsbb watch --no-esm"
2324
},
2425
"dependencies": {

packages/stylus-modules/src/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export type StylusLoaderOptions = LoaderConfOptions &
9191
) => string;
9292
};
9393

94-
const createLessModule = (stylusLoaderOptions = {} as StylusLoaderOptions) => {
94+
const createStylusModule = (stylusLoaderOptions = {} as StylusLoaderOptions) => {
9595
return function (conf: Configuration, evn: string, options = {} as ParsedArgs) {
9696
if (!conf) {
9797
throw Error('KKT:ConfigPaths: there is no config file found');
@@ -171,7 +171,7 @@ const createLessModule = (stylusLoaderOptions = {} as StylusLoaderOptions) => {
171171
/**
172172
* Use create-react-app to build react libraries. Support for regular less files and *.module.less files.
173173
*/
174-
const module = createLessModule();
175-
(module as any).withLoaderOptions = createLessModule;
174+
const stylusModule = createStylusModule();
175+
(stylusModule as any).withLoaderOptions = createStylusModule;
176176

177-
export default module;
177+
export default stylusModule;

0 commit comments

Comments
 (0)