Skip to content

Material UI React - Broken on production #5906

@rawnly

Description

@rawnly

Bug report

Hi guys, when I use dev: false inside my app, material-ui classes wont load.

Describe the bug

That's the code:

const port = process.env.PORT || 3000;
const dev = process.env.NODE_ENV !== 'production';
const app = next({ dev: false });
const handle = app.getRequestHandler();

app.prepare().then(() => {
	const server = express();
    
	// Routes and stuff...
})

The expected result should be:
cleanshot 2018-12-17 at 12 31 51

but is:
cleanshot 2018-12-17 at 12 25 52

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Install @material-ui
		"@material-ui/core": "latest",
		"@material-ui/icons": "^3.0.1",
		"@material-ui/styles": "^3.0.0-alpha.2",
  1. Run the server with production build

System information

  • OS: macOS Mojave v10.14.2
  • Version of Next.js: 7.0.2

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