Skip to content

Commit

Permalink
fix: css-loader default modules true
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Mar 8, 2021
1 parent 7d07d00 commit 031befb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions core/webpack-configs/src/react/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ export const react: PresetCallback = (options: BuildProps) => {
loader: 'css-loader',
options: customLoaderOptions(options, 'css-loader', {
sourceMap: true,
modules: true,
}),
},
...cssLoaders,
Expand Down
4 changes: 2 additions & 2 deletions examples/simple/src/component.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React, { FC } from 'react';
import './styles.css';
import styles from './styles.css';

export type ComponentProps = {
title: string;
};
export const Component: FC<ComponentProps> = ({ title }) => (
<div className="container">{title}</div>
<div className={styles.container}>{title}</div>
);

0 comments on commit 031befb

Please sign in to comment.