-
-
Notifications
You must be signed in to change notification settings - Fork 35
Can not load css in antd #36
Copy link
Copy link
Open
Labels
Description
version:
happypack@4.0.0, antd@2.13.11, webpack@2.7.0, ts-import-plugin@1.4.3
code:
// {
// loader: "babel-loader",
// query: {
// presets: ["env", "react", "stage-0"],
// plugins:[
// ["import", { libraryName: "antd", style: "css" }],
// ["transform-runtime"],
// ],
// },
// },
{
loader: "ts-loader",
options: {
// transpileOnly: true,
happyPackMode: true,
//这个组件暂时无效 不晓得是不是happypack的关系 而且纯用ts编译直出会导致一些问题 所以我还是选择babel
getCustomTransformers: () => ({
before: [ transformerFactory({
libraryName: 'antd',
// libraryDirectory: 'es',
style: 'css',
}) ]
}),
}
}describe:
Babel's import configuration is OK, replaced by TS import configuration will die, the compiler can pass but did not introduce css.
Reactions are currently unavailable