mirror of
https://github.com/wassname/react-webpack-template.git
synced 2026-09-09 11:32:46 +08:00
Moved run script to root of src folder and renamed it to index.j. Updated config files to use this as entry point to the template
This commit is contained in:
+1
-1
@@ -13,7 +13,7 @@ let config = _.merge({
|
|||||||
entry: [
|
entry: [
|
||||||
'webpack-dev-server/client?http://127.0.0.1:8000',
|
'webpack-dev-server/client?http://127.0.0.1:8000',
|
||||||
'webpack/hot/only-dev-server',
|
'webpack/hot/only-dev-server',
|
||||||
'./src/components/run'
|
'./src/index'
|
||||||
],
|
],
|
||||||
cache: true,
|
cache: true,
|
||||||
devtool: 'eval',
|
devtool: 'eval',
|
||||||
|
|||||||
+1
-1
@@ -10,7 +10,7 @@ let baseConfig = require('./base');
|
|||||||
let BowerWebpackPlugin = require('bower-webpack-plugin');
|
let BowerWebpackPlugin = require('bower-webpack-plugin');
|
||||||
|
|
||||||
let config = _.merge({
|
let config = _.merge({
|
||||||
entry: path.join(__dirname, '../src/components/run'),
|
entry: path.join(__dirname, '../src/index'),
|
||||||
cache: false,
|
cache: false,
|
||||||
devtool: 'sourcemap',
|
devtool: 'sourcemap',
|
||||||
plugins: [
|
plugins: [
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import 'core-js/fn/object/assign';
|
import 'core-js/fn/object/assign';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ReactDOM from 'react-dom';
|
import ReactDOM from 'react-dom';
|
||||||
import App from './Main';
|
import App from './components/Main';
|
||||||
|
|
||||||
// Render the main component into the dom
|
// Render the main component into the dom
|
||||||
ReactDOM.render(<App />, document.getElementById('app'));
|
ReactDOM.render(<App />, document.getElementById('app'));
|
||||||
Reference in New Issue
Block a user