created build
This commit is contained in:
parent
c23b6192f9
commit
9c0f597f8b
12 changed files with 58983 additions and 16 deletions
|
@ -1,7 +1,7 @@
|
|||
import React from 'react';
|
||||
import SEO from 'components/SEO';
|
||||
import NavBar from 'containers/NavBar';
|
||||
import ErrorPage from 'components/ErrorPage';
|
||||
import ErrorPage from 'pages/ErrorPage';
|
||||
import AssetTitle from 'containers/AssetTitle';
|
||||
import AssetDisplay from 'containers/AssetDisplay';
|
||||
import AssetInfo from 'containers/AssetInfo';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React from 'react';
|
||||
import SEO from 'components/SEO';
|
||||
import ErrorPage from 'components/ErrorPage';
|
||||
import ErrorPage from 'pages/ErrorPage';
|
||||
import NavBar from 'containers/NavBar';
|
||||
import ChannelClaimsDisplay from 'containers/ChannelClaimsDisplay';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import React from 'react';
|
||||
import ErrorPage from 'components/ErrorPage';
|
||||
import ErrorPage from 'pages/ErrorPage';
|
||||
import ShowAssetLite from 'containers/ShowAssetLite';
|
||||
import ShowAssetDetails from 'containers/ShowAssetDetails';
|
||||
import ShowChannel from 'containers/ShowChannel';
|
||||
|
|
10974
index.js
10974
index.js
File diff suppressed because one or more lines are too long
1
index.js.map
Normal file
1
index.js.map
Normal file
File diff suppressed because one or more lines are too long
47899
public/bundle/bundle.js
47899
public/bundle/bundle.js
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
32
webpack.client.common.js
Normal file
32
webpack.client.common.js
Normal file
|
@ -0,0 +1,32 @@
|
|||
const Path = require('path');
|
||||
const REACT_ROOT = Path.resolve(__dirname, 'client/');
|
||||
|
||||
module.exports = {
|
||||
target: 'web',
|
||||
entry : ['babel-polyfill', 'whatwg-fetch', './client/client.js'],
|
||||
output: {
|
||||
path : Path.join(__dirname, 'public/bundle/'),
|
||||
publicPath: 'public/bundle/',
|
||||
filename : 'bundle.js',
|
||||
},
|
||||
module: {
|
||||
loaders: [
|
||||
{
|
||||
test : /.jsx?$/,
|
||||
loader : 'babel-loader',
|
||||
exclude: /node_modules/,
|
||||
query : {
|
||||
presets: ['es2015', 'react', 'stage-2'],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
resolve: {
|
||||
modules: [
|
||||
REACT_ROOT,
|
||||
'node_modules',
|
||||
__dirname,
|
||||
],
|
||||
extensions: ['.js', '.jsx', '.scss'],
|
||||
},
|
||||
};
|
7
webpack.config.js
Normal file
7
webpack.config.js
Normal file
|
@ -0,0 +1,7 @@
|
|||
const serverBaseConfig = require('./webpack.server.common.js');
|
||||
const clientBaseConfig = require('./webpack.client.common.js');
|
||||
|
||||
module.exports = [
|
||||
serverBaseConfig,
|
||||
clientBaseConfig,
|
||||
];
|
13
webpack.dev.js
Normal file
13
webpack.dev.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
const serverBaseConfig = require('./webpack.server.common.js');
|
||||
const clientBaseConfig = require('./webpack.client.common.js');
|
||||
const merge = require('webpack-merge');
|
||||
|
||||
const devBuildConfig = {
|
||||
watch : true,
|
||||
devtool: 'inline-source-map',
|
||||
};
|
||||
|
||||
module.exports = [
|
||||
merge(serverBaseConfig, devBuildConfig),
|
||||
merge(clientBaseConfig, devBuildConfig),
|
||||
];
|
22
webpack.prod.js
Normal file
22
webpack.prod.js
Normal file
|
@ -0,0 +1,22 @@
|
|||
const webpack = require('webpack');
|
||||
const merge = require('webpack-merge');
|
||||
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
|
||||
const serverBaseConfig = require('./webpack.server.common.js');
|
||||
const clientBaseConfig = require('./webpack.client.common.js');
|
||||
|
||||
const productionBuildConfig = {
|
||||
devtool: 'source-map',
|
||||
plugins: [
|
||||
new UglifyJSPlugin({
|
||||
sourceMap: true,
|
||||
}),
|
||||
new webpack.DefinePlugin({
|
||||
'process.env.NODE_ENV': JSON.stringify('production'),
|
||||
}),
|
||||
],
|
||||
};
|
||||
|
||||
module.exports = [
|
||||
merge(serverBaseConfig, productionBuildConfig),
|
||||
merge(clientBaseConfig, productionBuildConfig),
|
||||
];
|
43
webpack.server.common.js
Normal file
43
webpack.server.common.js
Normal file
|
@ -0,0 +1,43 @@
|
|||
const Path = require('path');
|
||||
const nodeExternals = require('webpack-node-externals');
|
||||
const REACT_ROOT = Path.resolve(__dirname, 'client/');
|
||||
|
||||
module.exports = {
|
||||
target: 'node',
|
||||
node : {
|
||||
__dirname: false,
|
||||
},
|
||||
externals: [nodeExternals()],
|
||||
entry : ['babel-polyfill', 'whatwg-fetch', './server/server.js'],
|
||||
output : {
|
||||
path : Path.join(__dirname, '/'),
|
||||
publicPath : '/',
|
||||
filename : 'index.js',
|
||||
library : '',
|
||||
libraryTarget: 'commonjs-module',
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test : /.jsx?$/,
|
||||
exclude: /node_modules/,
|
||||
loader : 'babel-loader',
|
||||
options: {
|
||||
presets: ['es2015', 'react', 'stage-2'],
|
||||
},
|
||||
},
|
||||
{
|
||||
test : /.css$/,
|
||||
loader: 'css-loader',
|
||||
},
|
||||
],
|
||||
},
|
||||
resolve: {
|
||||
modules: [
|
||||
REACT_ROOT,
|
||||
'node_modules',
|
||||
__dirname,
|
||||
],
|
||||
extensions: ['.js', '.json', '.jsx', '.css'],
|
||||
},
|
||||
};
|
Loading…
Reference in a new issue