messages.js 1.6 KB

12345678910111213141516171819202122232425262728
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.getGlobalImportError = getGlobalImportError;
  6. exports.getGlobalModuleImportError = getGlobalModuleImportError;
  7. exports.getLocalModuleImportError = getLocalModuleImportError;
  8. exports.getCustomDocumentError = getCustomDocumentError;
  9. var _chalk = _interopRequireDefault(require("next/dist/compiled/chalk"));
  10. function _interopRequireDefault(obj) {
  11. return obj && obj.__esModule ? obj : {
  12. default: obj
  13. };
  14. }
  15. function getGlobalImportError() {
  16. return `Global CSS ${_chalk.default.bold("cannot")} be imported from files other than your ${_chalk.default.bold("Custom <App>")}. Due to the Global nature of stylesheets, and to avoid conflicts, Please move all first-party global CSS imports to ${_chalk.default.cyan("pages/_app.js")}. Or convert the import to Component-Level CSS (CSS Modules).\nRead more: https://nextjs.org/docs/messages/css-global`;
  17. }
  18. function getGlobalModuleImportError() {
  19. return `Global CSS ${_chalk.default.bold("cannot")} be imported from within ${_chalk.default.bold("node_modules")}.\nRead more: https://nextjs.org/docs/messages/css-npm`;
  20. }
  21. function getLocalModuleImportError() {
  22. return `CSS Modules ${_chalk.default.bold("cannot")} be imported from within ${_chalk.default.bold("node_modules")}.\nRead more: https://nextjs.org/docs/messages/css-modules-npm`;
  23. }
  24. function getCustomDocumentError() {
  25. return `CSS ${_chalk.default.bold("cannot")} be imported within ${_chalk.default.cyan("pages/_document.js")}. Please move global styles to ${_chalk.default.cyan("pages/_app.js")}.`;
  26. }
  27. //# sourceMappingURL=messages.js.map