Skip to content
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

add styleLibraryDirectory option, fixes #381 #382

Merged
merged 1 commit into from
Nov 25, 2019

Conversation

StephenPCG
Copy link
Contributor

添加两个配置项, styleLibraryDirectorycustomStyleName

如果提供了 styleLibraryDirectory,那么该选项将用于构造 style 文件路径,构造方式与 libraryDirectory 类似。例如配置为:

{
    "libraryName": "element-ui",
    "styleLibraryDirectory": "lib/theme-chalk"
}

行为:

import { Button } from 'element-ui';

           

var _button = require('element-ui/lib/button');
require('element-ui/lib/theme-chalk/button');

此外增加了 customStyleName,行为与 customName 一致,不过用于 style 文件而不是 js 文件。当指定了 customStyleNamestyleLibraryDirectorystyle 都将被忽略。

@sorrycc
Copy link
Member

sorrycc commented Nov 24, 2019

加下用例。

@StephenPCG StephenPCG force-pushed the add-option-styleLibraryDirectory branch from aeb9193 to f383c53 Compare November 25, 2019 03:49
@StephenPCG
Copy link
Contributor Author

已添加测试用例。这块东西我不是很熟悉,如果我添加的用例有问题,请指出,我来修改。

@sorrycc sorrycc merged commit 36cb5e4 into umijs:master Nov 25, 2019
@zjjjjjjjjjjd
Copy link

有个问题,使用了styleLibraryDirectory配置,style的配置将会无效

zhanguangao pushed a commit to zhanguangao/babel-plugin-module-federation-import that referenced this pull request Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants