This type of export will cause a crash in an electrode app:
export * from './i18n';
| var app = require("../../../src/server/test-server.js"); | |
| var request = require("supertest"); | |
| var db = require("../../../src/server/models"); | |
| describe("PageBuilder API integration tests", () => { | |
| describe("authentication", () => { | |
| var token; | |
| describe("Protected API endpoints without token", () => { | |
| it("should deny access without a token", () => { |
| const util = require("util"); | |
| // RECURSIVE FUNCTIONS: pow, fibonaci, factorial, map, reverse | |
| const pow = (b, n) => (n === 1 ? b : b * pow(b, n - 1)); | |
| const fibonaci = x => (x <= 1 ? 1 : fibonaci(x - 1) + fibonaci(x - 2)); | |
| const factorial = x => (x === 1 ? 1 : x * factorial(x - 1)); |
| // helper functions | |
| const format = data => JSON.stringify(data); | |
| const title = title => console.log(`\n${title}\n---------------------`); | |
| const iterate = (fnName, fn) => { | |
| [1, 2, 3, 4, 5].forEach(n => { | |
| console.log(`${fnName}(${n}) = ${fn(n)}`); | |
| }); | |
| }; |
| /* eslint-disable react/no-danger, import/no-unresolved */ | |
| import React from "react"; | |
| import Document, { Head, Main, NextScript } from "next/document"; | |
| import { extractStyles } from "evergreen-ui"; | |
| export default class MyDocument extends Document { | |
| static async getInitialProps({ renderPage }) { | |
| const page = renderPage(); | |
| // `css` is a string with css from both glamor and ui-box. | |
| // No need to get the glamor css manually if you are using it elsewhere in your app. |
| { | |
| "presets": [ | |
| [ | |
| "next/babel", | |
| { | |
| "styled-jsx": { | |
| "plugins": [ | |
| "styled-jsx-plugin-sass" | |
| ] | |
| } |
| import Document, { Head, Main, NextScript } from "next/document"; | |
| import { ServerStyleSheet } from "styled-components"; | |
| export default class MyDocument extends Document { | |
| static getInitialProps({ renderPage }) { | |
| const sheet = new ServerStyleSheet(); | |
| const page = renderPage(App => props => | |
| sheet.collectStyles(<App {...props} />) | |
| ); | |
| const styleTags = sheet.getStyleElement(); |
| { | |
| "presets": ["next/babel"] | |
| } |
| import NextHead from "next/head"; | |
| const Head = () => ( | |
| <div> | |
| <NextHead> | |
| <meta charSet="UTF-8" /> | |
| {/* <title>{props.title || ""}</title> | |
| <meta name="description" content={props.description || ""} /> */} | |
| <meta name="viewport" content="width=device-width, initial-scale=1" /> |