Unverified Commit c03c74c7 authored by Carlos Azuaje's avatar Carlos Azuaje Committed by GitHub
Browse files

refactor(update): webpack and react



* refactor(update): webpack and react
Signed-off-by: default avatarCarlos Azuaje <carlosjazzc1@gmail.com>

* fix(npm): add other dependencies and babel stage-0
Signed-off-by: default avatarCarlos Azuaje <carlosjazzc1@gmail.com>

* fix(yarn): delete yarn.lock and ignore it
Signed-off-by: default avatarCarlos Azuaje <carlosjazzc1@gmail.com>
parent 6088c430
......@@ -2,10 +2,6 @@
"presets": [
"env",
"react",
"stage-1"
],
"plugins": [
"transform-class-properties",
"transform-decorators"
"stage-0"
]
}
\ No newline at end of file
......@@ -5,7 +5,7 @@ app/static/javascript/bin/bundle.js
app/static/files/*
package-lock.json
yarn.lock
*pyc
!app/static/files/.gitkeep
......
{
"name": "flask-socketio-react-fileupload",
"name": "react_search",
"version": "1.0.0",
"description": "",
"description": "Search app using React",
"main": "index.js",
"scripts": {
"watch": "node_modules/.bin/webpack --watch"
"start": "webpack --mode development",
"build": "webpack --mode production"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"babel-core": "^6.26.0",
"babel-loader": "^7.1.2",
"babel-core": "^6.26.3",
"babel-loader": "^7.1.5",
"babel-preset-env": "^1.7.0",
"babel-preset-react": "^6.24.1",
"babel-preset-airbnb": "^2.4.0",
"babel-preset-env": "^1.6.1",
"babel-preset-stage-1": "^6.24.1",
"css-loader": "^0.28.7",
"style-loader": "^0.19.0",
"webpack": "^3.8.1"
"babel-preset-stage-0": "^6.24.1",
"css-loader": "^1.0.0",
"style-loader": "^0.21.0",
"webpack": "^4.15.1",
"webpack-cli": "^2.1.5"
},
"dependencies": {
"rc-progress": "^2.2.2",
"react": "^16.0.0",
"react-dom": "^16.0.0",
"socket.io-client": "^2.0.2"
"rc-progress": "^2.2.5",
"react": "^16.4.1",
"react-dom": "^16.4.1",
"socket.io-client": "^2.1.1"
}
}
var path = require('path');
const ENTRY_DIR = path.resolve(__dirname, 'app/static/javascript/src');
const OUTPUT_DIR = path.resolve(__dirname, 'app/static/javascript/bin');
var config = {
entry: ENTRY_DIR + '/index.js',
module.exports = {
entry: ENTRY_DIR + '/index.js',
output: {
path: path.resolve(__dirname, 'app/static/javascript/bin'),
path: OUTPUT_DIR,
filename: 'bundle.js'
},
module : {
loaders : [
module: {
rules: [
{
test : /\.js?/,
include : ENTRY_DIR,
loader : 'babel-loader'
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: "babel-loader"
}
},
{
test: /\.css$/,
use: [ 'style-loader', 'css-loader' ]
use: ['style-loader', 'css-loader']
}
]
}
};
module.exports = config;
\ No newline at end of file
};
\ No newline at end of file
Supports Markdown
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