Skip to content

All CSS-files are treated as CSS Modules #653

@artemtam

Description

@artemtam

Regardless --css-modules flag, it is impossible to use CSS and CSS Modules in the same project. It seems that null option works incorrectly and Rollup treats all CSS files as modules.

To reproduce, you could try to build this simple example:

import React from 'react';

import './index.css'
import styles from './index.module.css';

const App = () => (
  <div>
    <div className={styles.moduleClass}>CSS module class</div>
    <div className="local-no-module-class">No-module class</div>
  </div>
);

export default App;

Building with microbundle ./index.jsx makes the following index.css file:

._1fWqO{color:#00f}
._3umtn{color:red}

However, the expected result is:

._1fWqO{color:#00f}
.local-no-module-class{color:red}

Metadata

Metadata

Assignees

No one assigned

    Labels

    CSShas-fixA fix is available, but may not yet be released.upstream

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions