Commit 20a4143d authored by George Popoff's avatar George Popoff

Подключил React для создания ui страницы

parent a2ada5f1
{
"presets": [
"es2015", "stage-0", "react"
]
}
\ No newline at end of file
import React from 'react';
import ReactDOM from 'react-dom';
ReactDOM.render(
<h1>Hello, world!</h1>,
document.getElementById('root')
);
\ No newline at end of file
...@@ -7,12 +7,17 @@ ...@@ -7,12 +7,17 @@
"dependencies": { "dependencies": {
"free-jqgrid": "^4.15.3", "free-jqgrid": "^4.15.3",
"jquery": "^3.3.1", "jquery": "^3.3.1",
"jquery-ui": "^1.12.1" "jquery-ui": "^1.12.1",
"react": "^16.3.0",
"react-dom": "^16.3.0"
}, },
"devDependencies": { "devDependencies": {
"babel-core": "^6.26.0", "babel-core": "^6.26.0",
"babel-loader": "^7.1.4", "babel-loader": "^7.1.4",
"babel-preset-es2015": "^6.24.1", "babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-0": "^6.24.1",
"webpack": "^4.4.1", "webpack": "^4.4.1",
"webpack-cli": "^2.0.13" "webpack-cli": "^2.0.13"
}, },
......
const path = require("path"); const path = require("path");
const webpack = require("webpack");
module.exports = { module.exports = {
entry: [ entry: [
// Application code // Application code
"./javascript/src/typos.js", "./javascript/src/typos.jsx",
], ],
output: { output: {
...@@ -12,21 +13,17 @@ module.exports = { ...@@ -12,21 +13,17 @@ module.exports = {
}, },
mode: "development", mode: "development",
};
module.loaders = [
{
loader: "babel-loader",
include: [ module: {
path.resolve(__dirname, "javascript/src") rules: [
], {
loader: "babel-loader",
test: "/\.js$/", exclude: /node_modules/,
query: { test: /\.js[x]?$/,
presets: ['es2015'] }
} ]
} }
]; };
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment