I created in /packages folder called material-ui-next with just package.json inside it, which contains:
{ "name": "material-ui-next", "version": "1.0.0", "scripts": { "postinstall": "mv node_modules/material-ui/* ." }, "dependencies": { "material-ui": "next" } }
So now you can make npm install packages/material-ui-next --save from the project root, then you can createPalette = require('material-ui-next/styles/palette') or what is required from material-ui , now an alias as material-ui-next .
Explanations: since "material-ui": "next" is a dependency, it will be installed in node_modules/material-ui , so adding a script after installing the material-ui-next package to move node_modules/material-ui to the package root, we can require('material-ui-next/WHATEVER')
source share