nickjj / demo-for-chattanooga-python-user-group Goto Github PK
View Code? Open in Web Editor NEWA demo app for a talk I gave at the Chattanooga python user group.
A demo app for a talk I gave at the Chattanooga python user group.
Hi Nick,
thanks for the great topics regarding Webpack + Flask + React. Unfortunately, as always with open source software, there is no back compatibility with new module updates. Due to React and Webpack updates the example doesn't work out of the box.
Error 1 (webpackffails):
Module not found: Error: Cannot resolve module 'react/lib/ReactMount'
@ ./assets/scripts/App.jsx 1:349-380
Error 2 (webpack fails):
ERROR in chunk app_css [entry]
[name].[chunkhash].js
Cannot use [chunkhash] for chunk in '[name].[chunkhash].js' (use [hash] instead)
Error 3 (in the console if you would solve issue 1&2):
_react2.default.render is not a function
Here is my knowledge of React was over.
Would it be feasible to fix the example?
Thanks.
I know this is just a demo project, so feel free to ignore this issue. When I do npm run build
it get the following assets created in the build
subdir:
(demo-flask-webpack)user@flyer:~/development/demo-for-chattanooga-python-user-group$ tree -h build
build
├── [ 248] manifest.json
└── [4.0K] public
├── [ 151] app_css.e08ad6a2ac6ad609ad1b.css
├── [1.6K] app_css.e08ad6a2ac6ad609ad1b.js
├── [626K] app_js.9ae3cd553b1a5d3586d5.js
└── [4.0K] images
└── [ 21K] life-after-webpack.3c98e77705fd928eace803d8fc163e60.jpg
2 directories, 5 files
(demo-flask-webpack)user@flyer:~/development/demo-for-chattanooga-python-user-group$ cat build/manifest.json | python -m json.tool
{
"assets": {
"app_css.css": "app_css.e08ad6a2ac6ad609ad1b.css",
"app_js.js": "app_js.9ae3cd553b1a5d3586d5.js",
"images/life-after-webpack.jpg": "images/life-after-webpack.3c98e77705fd928eace803d8fc163e60.jpg"
},
"publicPath": "http://localhost:2992/assets/"
}
Is there a way to suppress creating app_css.hash.js
?
It looks like a js
file being created for the app_css
entry with most of it's content removed by theextract-text-webpack-plugin
. It, correctly, isn't included in the manifest.json
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.