Skip to content
This repository was archived by the owner on Jul 6, 2021. It is now read-only.
This repository was archived by the owner on Jul 6, 2021. It is now read-only.

next-css not working with next 6 & next 7 #274

Closed
@CYB3RL1F3

Description

@CYB3RL1F3

Bug report

Impossible to load style from node_module react-slick.

Describe the bug

Receive this message :

Module build failed (from app/node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleParseError: Module parse failed: Unexpected character '' (1:0)
You may need an appropriate loader to handle this file type.
(Source code omitted for this binary file)

To Reproduce

apply next.config.js like following :

module.exports = withCss(withTypescript({
    distDir: '../dist',
}));

Also tried :

const wcss = withCss({
    server: true
});

module.exports = withTypescript({
    distDir: '../dist',
    ...wcss
});

I tried options like modules, etc...
The CSS file is loaded from a node_module.
Important : we are in a lerna context. The component using the css is in UI and called from main-app. The typescript is configured in UI (that's why there is only distDir in the typescript options).

Steps to reproduce the behavior, please provide code snippets or a repository:
with next 7.0.0 and next-css 1.0.0

System information

  • Version of Next.js: [e.g. 7.0.0]

Additional context

Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions