coryhouse / pluralsight-redux-starter

Completed Dev Environment for "Building Applications with React and Redux" on Pluralsight
https://app.pluralsight.com/library/courses/react-redux-react-router-es6/
1.27k stars 912 forks source link

index.js not getting loaded #59

Closed ghost closed 7 years ago

ghost commented 7 years ago

nothing happens after loading the app.its just showing index.html without routes.I think problem is inside webpack

import webpack from 'webpack';
import path from 'path';

export default {
    debug: true,
    devtool: 'inline-source-map',
    noInfo: false,
    entry: [
        'eventsource-polyfill', // necessary for hot reloading with IE
        'webpack-hot-middleware/client?reload=true', //note that it reloads the page if hot module reloading fails.
        path.resolve(__dirname, 'src/index')
    ],
    target: 'web',
    output: {
        path: __dirname + '/dist', // Note: Physical files are only output by the production build task `npm run build`.
        publicPath: '/',
        filename: 'bundle.js'
    },
    devServer: {
        contentBase: path.resolve(__dirname, 'src')
    },
    plugins: [
        new webpack.HotModuleReplacementPlugin(),
        new webpack.NoErrorsPlugin()
    ],
    module: {
        loaders: [
            {test: /\.js$/, include: path.join(__dirname, 'src'), loaders: ['babel']},
            {test: /(\.css)$/, loaders: ['style', 'css']},
            {test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, loader: 'file'},
            {test: /\.(woff|woff2)$/, loader: 'url?prefix=font/&limit=5000'},
            {test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, loader: 'url?limit=10000&mimetype=application/octet-stream'},
            {test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, loader: 'url?limit=10000&mimetype=image/svg+xml'}
        ]
    }
};

I am using linux. you may have a answer for this.thanks

coryhouse commented 7 years ago

Try comparing to the final course exercise. Please post your issue on the course discussion if it persists.

On Jun 3, 2017 10:43 PM, "Samith Dilhara" notifications@github.com wrote:

nothing happens after loading the app.its just showing index.html without routes.I think problem is inside webpack

import webpack from 'webpack'; import path from 'path';

export default { debug: true, devtool: 'inline-source-map', noInfo: false, entry: [ 'eventsource-polyfill', // necessary for hot reloading with IE 'webpack-hot-middleware/client?reload=true', //note that it reloads the page if hot module reloading fails. path.resolve(dirname, 'src/index') ], target: 'web', output: { path: dirname + '/dist', // Note: Physical files are only output by the production build task npm run build. publicPath: '/', filename: 'bundle.js' }, devServer: { contentBase: path.resolve(dirname, 'src') }, plugins: [ new webpack.HotModuleReplacementPlugin(), new webpack.NoErrorsPlugin() ], module: { loaders: [ {test: /.js$/, include: path.join(dirname, 'src'), loaders: ['babel']}, {test: /(.css)$/, loaders: ['style', 'css']}, {test: /.eot(\?v=\d+.\d+.\d+)?$/, loader: 'file'}, {test: /.(woff|woff2)$/, loader: 'url?prefix=font/&limit=5000'}, {test: /.ttf(\?v=\d+.\d+.\d+)?$/, loader: 'url?limit=10000&mimetype=application/octet-stream'}, {test: /.svg(\?v=\d+.\d+.\d+)?$/, loader: 'url?limit=10000&mimetype=image/svg+xml'} ] } };

I am using linux. you may have a answer for this.thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/coryhouse/pluralsight-redux-starter/issues/59, or mute the thread https://github.com/notifications/unsubscribe-auth/ABnFpdS-yYBALv2FWFT-xn0LU5kpMskqks5sAifUgaJpZM4NvRBg .