Skip to content

Commit 134072b

Browse files
authored
node
1 parent 8e15231 commit 134072b

13 files changed

+11421
-0
lines changed

node-web-template/client/package-lock.json

+1,683
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node-web-template/client/package.json

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "web_app",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"author": "",
10+
"license": "ISC",
11+
"dependencies": {
12+
"react": "^16.13.1",
13+
"react-dom": "^16.13.1"
14+
},
15+
"devDependencies": {
16+
"@babel/plugin-transform-runtime": "^7.10.3",
17+
"@babel/preset-env": "^7.10.3",
18+
"@babel/preset-react": "^7.10.1",
19+
"babel-loader": "^8.1.0"
20+
}
21+
}

node-web-template/client/src/index.js

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import React from 'react'
2+
import ReactDOM from 'react-dom'
3+
4+
class App extends React.Component {
5+
render = () => {
6+
return <div>Complete web template</div>
7+
}
8+
}
9+
10+
ReactDOM.render(<App />, document.getElementById('root'))
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
const path = require('path')
2+
const { getMode } = require('../shared/dev')
3+
4+
module.exports = {
5+
mode: getMode(),
6+
target: 'web',
7+
entry: './src/index.js',
8+
output: {
9+
path: path.resolve(__dirname, '../dist/public'),
10+
filename: 'client.bundle.js'
11+
},
12+
module: {
13+
rules: [
14+
{
15+
test: /\.js$/,
16+
exclude: /node_modules/,
17+
use: {
18+
loader: 'babel-loader'
19+
}
20+
}
21+
]
22+
}
23+
}

0 commit comments

Comments
 (0)