Skip to content

Instantly share code, notes, and snippets.

@mitro
Last active April 6, 2017 08:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mitro/cc53c11676096cdbccdf58c1b9ea7ef0 to your computer and use it in GitHub Desktop.
Save mitro/cc53c11676096cdbccdf58c1b9ea7ef0 to your computer and use it in GitHub Desktop.
.page {
lost-center: 980px;
}
import React from 'react';
import { Link } from 'react-router-dom';
import styles from './App.css';
class App extends React.Component {
render() {
return (
<section className={styles.page}>
<div>
<Link to='login'>Login</Link><br />
</div>
</section>
);
}
}
export default App;
module.exports = {
plugins: [
require('lost'),
require('postcss-cssnext'),
require('postcss-modules')
]
}
'use strict';
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const htmlWebpackPluginConfig = new HtmlWebpackPlugin({
template: './client/src/index.html',
filename: 'index.html',
inject: 'body'
});
module.exports = {
entry: './client/src/index.js',
output: {
path: path.resolve('dist'),
filename: 'index_bundle.js'
},
module: {
loaders: [
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/
},
{
test: /\.jsx$/,
loader: 'babel-loader',
exclude: /node_modules/
},
{
test: /\.css$/,
loaders: [
'style-loader',
'css-loader?importLoaders=1',
'postcss-loader'
]
}
]
},
plugins: [
htmlWebpackPluginConfig
],
devServer: {
historyApiFallback: true,
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment