[go: nahoru, domu]

Skip to content

Commit

Permalink
Stop importing CSS files
Browse files Browse the repository at this point in the history
  • Loading branch information
zesik committed Feb 9, 2019
1 parent 98c5183 commit d6d1cea
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
17 changes: 9 additions & 8 deletions src/components/SplitterLayout.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import Pane from './Pane';
import '../stylesheets/index.css';

function clearSelection() {
if (document.body.createTextRange) {
Expand Down Expand Up @@ -206,13 +205,15 @@ class SplitterLayout extends React.Component {
<div className={containerClasses} ref={(c) => { this.container = c; }}>
{wrappedChildren[0]}
{wrappedChildren.length > 1 &&
<div
role="separator"
className="layout-splitter"
ref={(c) => { this.splitter = c; }}
onMouseDown={this.handleSplitterMouseDown}
onTouchStart={this.handleSplitterMouseDown}
/>
(
<div
role="separator"
className="layout-splitter"
ref={(c) => { this.splitter = c; }}
onMouseDown={this.handleSplitterMouseDown}
onTouchStart={this.handleSplitterMouseDown}
/>
)
}
{wrappedChildren.length > 1 && wrappedChildren[1]}
</div>
Expand Down
17 changes: 10 additions & 7 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,32 @@
const { resolve } = require('path');
const webpack = require('webpack');
const CopyWebpackPlugin = require('copy-webpack-plugin');

module.exports = {
mode: 'production',
entry: [
'./index.js'
],
resolve: {
extensions: ['.js', '.jsx', '.css']
extensions: ['.js', '.jsx']
},
module: {
rules: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
use: 'babel-loader'
}, {
test: /\.css$/,
use: [
'style-loader',
'css-loader'
]
}
]
},
plugins: [
new CopyWebpackPlugin([
{
from: 'src/stylesheets/*',
flatten: true
}
])
],
output: {
path: resolve(__dirname, 'lib'),
filename: 'index.js',
Expand Down

0 comments on commit d6d1cea

Please sign in to comment.