Skip to content

Commit

Permalink
馃悰 fix graphin studio bundle config
Browse files Browse the repository at this point in the history
  • Loading branch information
zxc0328 committed Dec 24, 2019
1 parent 60b7fc9 commit 31ca222
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
3 changes: 3 additions & 0 deletions packages/graphin-studio/src/Graph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ import useGraphEvents from './Events/useGraphEvents';
/** components */
import NodeEdgeCount from './Core/NodeEdgeCount';

import '@antv/graphin/dist/index.css';
import '@antv/graphin-components/dist/index.css';

const Graphene = (props: GraphProps) => {
const graphRef = useRef(null) as any; // eslint-disable-line
const { dispatch, data, layout, toolbar, store } = props;
Expand Down
4 changes: 2 additions & 2 deletions packages/graphin-studio/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export interface SearchBarProps {
}

export interface ToolBarProps {
direction: string;
direction: 'horizontal' | 'vertical';
}

export interface GrapheneState {
Expand Down Expand Up @@ -180,7 +180,7 @@ export interface RenderToolbarProps {
edges: number;
};
};
[key: string]: any;
[key: string]: any; // eslint-disable-line
};
direction: string;
graph: Graph;
Expand Down
8 changes: 3 additions & 5 deletions packages/graphin-studio/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ module.exports = env => {
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader'],
sideEffects: true,
use: [MiniCssExtractPlugin.loader, 'css-loader'],
},
{
test: /\.(png|jpe?g|gif|svg)$/i,
Expand All @@ -57,7 +56,7 @@ module.exports = env => {
test: /\.less$/,
use: [
{
loader: 'style-loader',
loader: MiniCssExtractPlugin.loader,
},
{
loader: 'css-loader', // translates CSS into CommonJS
Expand All @@ -69,7 +68,6 @@ module.exports = env => {
},
},
],
sideEffects: true,
},
{
test: /\.(woff|woff2|eot|ttf|otf)$/,
Expand Down Expand Up @@ -97,9 +95,9 @@ module.exports = env => {
contentBase: path.join(__dirname, 'public/'),
port: 3003,
publicPath: 'http://localhost:3003/',
hotOnly: true,
},
plugins: [
new MiniCssExtractPlugin(),
// new BundleAnalyzerPlugin(),
new HtmlWebpackPlugin({
title: 'example',
Expand Down

0 comments on commit 31ca222

Please sign in to comment.