Skip to content

Does not bundle all imported css files #102

@danez

Description

@danez

I have a weird problem:
I have a js file that imports a css file and a less file. The imported less file is included in the extracted file the imported css file is not.

Now I think this might have todo because I recently added code splitting here: https://github.com/reactjs/react-tabs/blob/master/examples/src/components/ExampleItem.js#L19 But this async import and the import of the css should not influence each other as far as I understand.

The output of webpack looks like this, which does not really help me:

Child mini-css-extract-plugin ../../node_modules/css-loader/index.js!../../node_modules/less-loader/dist/cjs.js!example.less:
    Entrypoint mini-css-extract-plugin = *
    [1] /Users/danieltschinder/Documents/Github/react-tabs/node_modules/css-loader!/Users/danieltschinder/Documents/Github/react-tabs/node_modules/less-loader/dist/cjs.js!./example.less 4.17 KiB {0} [built]
        + 1 hidden module
Child mini-css-extract-plugin ../../node_modules/css-loader/index.js!../../node_modules/less-loader/dist/cjs.js!../../node_modules/react-live/react-live.css:
    Entrypoint mini-css-extract-plugin = *
       2 modules

Webpack config: https://github.com/reactjs/react-tabs/blob/master/webpack.config.js

How to reproduce:

  1. git clone https://github.com/reactjs/react-tabs.git
  2. yarn install
  3. yarn run website:build
  4. Look at examples/dist/app-xxx.css and see that it does not contain the css from react-live/react-live.css (easily discoverable by searching for .prism-code { which should be included)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions