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 @@
"dependencies": {
"free-jqgrid": "^4.15.3",
"jquery": "^3.3.1",
"jquery-ui": "^1.12.1"
"jquery-ui": "^1.12.1",
"react": "^16.3.0",
"react-dom": "^16.3.0"
},
"devDependencies": {
"babel-core": "^6.26.0",
"babel-loader": "^7.1.4",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-0": "^6.24.1",
"webpack": "^4.4.1",
"webpack-cli": "^2.0.13"
},
......
const path = require("path");
const webpack = require("webpack");
module.exports = {
entry: [
// Application code
"./javascript/src/typos.js",
"./javascript/src/typos.jsx",
],
output: {
......@@ -12,21 +13,17 @@ module.exports = {
},
mode: "development",
};
module.loaders = [
{
loader: "babel-loader",
include: [
path.resolve(__dirname, "javascript/src")
],
module: {
rules: [
{
loader: "babel-loader",
test: "/\.js$/",
exclude: /node_modules/,
query: {
presets: ['es2015']
}
test: /\.js[x]?$/,
}
]
}
];
};
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