mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-09 06:55:47 +01:00
reenable code splitting for react-syntax-highlighter package
This commit is contained in:
@@ -12,9 +12,9 @@
|
|||||||
"license": "BSD-3-Clause",
|
"license": "BSD-3-Clause",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"storybook": "NODE_ENV=development start-storybook -s ../ui-webapp/public,src/__resources__",
|
"storybook": "start-storybook -s ../ui-webapp/public",
|
||||||
"storyshots": "jest --testPathPattern=\"storyshots.test.js\" --collectCoverage=false",
|
"storyshots": "jest --testPathPattern=\"storyshots.test.js\" --collectCoverage=false",
|
||||||
"update-storyshots": "jest --testPathPattern=\"storyshots.test.js\" --testNamePattern \".*Button\" --collectCoverage=false -u"
|
"update-storyshots": "jest --testPathPattern=\"storyshots.test.js\" --collectCoverage=false -u"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@scm-manager/ui-tests": "^2.0.0-SNAPSHOT",
|
"@scm-manager/ui-tests": "^2.0.0-SNAPSHOT",
|
||||||
|
|||||||
@@ -1,11 +1,7 @@
|
|||||||
// @flow
|
// @flow
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
// TODO fix code splitting in production
|
import { LightAsync as ReactSyntaxHighlighter } from "react-syntax-highlighter";
|
||||||
// Storybook does not like the LightAsync import:
|
|
||||||
// import { LightAsync as ReactSyntaxHighlighter } from "react-syntax-highlighter";
|
|
||||||
// so we should use the default import for development and the LightAsync for production
|
|
||||||
import ReactSyntaxHighlighter from "react-syntax-highlighter";
|
|
||||||
import { arduinoLight } from "react-syntax-highlighter/dist/cjs/styles/hljs";
|
import { arduinoLight } from "react-syntax-highlighter/dist/cjs/styles/hljs";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
|
|||||||
Reference in New Issue
Block a user