mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2025-10-30 01:26:43 +08:00
cleanup (structure): update code structure
This commit is contained in:
@ -1,4 +1,3 @@
|
|||||||
// src/app-client.js
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ReactDOM from 'react-dom';
|
import ReactDOM from 'react-dom';
|
||||||
import Router from './router';
|
import Router from './router';
|
||||||
@ -2,12 +2,10 @@ const webpack = require('webpack');
|
|||||||
const path = require('path');
|
const path = require('path');
|
||||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let config = {
|
let config = {
|
||||||
entry: [
|
entry: [
|
||||||
'babel-polyfill',
|
'babel-polyfill',
|
||||||
path.join(__dirname, 'src', 'client.js')
|
path.join(__dirname, 'client', 'index.js')
|
||||||
],
|
],
|
||||||
output: {
|
output: {
|
||||||
path: path.join(__dirname, 'server', 'public'),
|
path: path.join(__dirname, 'server', 'public'),
|
||||||
@ -17,7 +15,7 @@ let config = {
|
|||||||
module: {
|
module: {
|
||||||
loaders: [
|
loaders: [
|
||||||
{
|
{
|
||||||
test: path.join(__dirname, 'src'),
|
test: path.join(__dirname, 'client'),
|
||||||
loader: ['babel-loader']
|
loader: ['babel-loader']
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -32,7 +30,7 @@ let config = {
|
|||||||
}),
|
}),
|
||||||
new webpack.optimize.OccurrenceOrderPlugin(),
|
new webpack.optimize.OccurrenceOrderPlugin(),
|
||||||
new HtmlWebpackPlugin({
|
new HtmlWebpackPlugin({
|
||||||
template: __dirname + '/src/index.html',
|
template: path.join(__dirname, 'client', 'index.html'),
|
||||||
inject:true
|
inject:true
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
@ -57,7 +55,7 @@ if(process.env.NODE_ENV === 'production'){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
config.entry.push('webpack/hot/only-dev-server');
|
//config.entry.push('webpack/hot/only-dev-server');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user