Skip to content

Commit

Permalink
Import react-syntax-highlighter from src
Browse files Browse the repository at this point in the history
  • Loading branch information
plesiecki committed Mar 7, 2022
1 parent 1e8ff03 commit cb3af89
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
6 changes: 5 additions & 1 deletion config/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ module.exports = {
use: ["source-map-loader"]
},
{
test: /\.tsx?$/,
test: /\.[jt]sx?$/,
exclude: {
and: [/node_modules/],
not: [/react-syntax-highlighter/],
},
use: [{
loader: "babel-loader",
options: {
Expand Down
6 changes: 5 additions & 1 deletion config/webpack.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ const prodConfig = {
const es5Config = {
module: {
rules: [{
test: /\.tsx?$/,
test: /\.[jt]sx?$/,
exclude: {
and: [/node_modules/],
not: [/react-syntax-highlighter/],
},
use: [{
loader: "babel-loader",
options: {
Expand Down
2 changes: 1 addition & 1 deletion src/client/modals/source-modal/source-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

import * as jsonLanguage from "highlight.js/lib/languages/json";
import * as React from "react";
import { Light as SyntaxHighlighter } from "react-syntax-highlighter";
import githubGist from "react-syntax-highlighter/dist/cjs/styles/hljs/github-gist";
import SyntaxHighlighter from "react-syntax-highlighter/src/light";
import { Fn } from "../../../common/utils/general/general";
import { Button } from "../../components/button/button";
import { Modal } from "../../components/modal/modal";
Expand Down

0 comments on commit cb3af89

Please sign in to comment.