1
0
Fork 0

Revert "Add webpack"

This reverts commit baa7b2b5dd.
This commit is contained in:
Egor Savkin 2023-06-29 11:51:39 +08:00
parent 37907b9504
commit 75bc12ff64
4 changed files with 1722 additions and 4235 deletions

5926
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,7 @@
"description": "These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. For deployment, see the nix-scripts repository. Commits to https://git.m-labs.hk/M-Labs/web2019.git are automatically deployed to m-labs.hk through Hydra.", "description": "These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. For deployment, see the nix-scripts repository. Commits to https://git.m-labs.hk/M-Labs/web2019.git are automatically deployed to m-labs.hk through Hydra.",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1", "test": "echo \"Error: no test specified\" && exit 1",
"start": "./node_modules/.bin/babel static/js/shop.jsx --watch -o static/js/shop_bundle.js", "start": "./node_modules/.bin/babel static/js/shop.jsx --watch -o static/js/shop.min.js",
"build": "./node_modules/.bin/babel static/js/shop.jsx -o static/js/shop.min.js" "build": "./node_modules/.bin/babel static/js/shop.jsx -o static/js/shop.min.js"
}, },
"repository": { "repository": {
@ -16,12 +16,7 @@
"@babel/core": "^7.9.0", "@babel/core": "^7.9.0",
"@babel/preset-env": "^7.9.5", "@babel/preset-env": "^7.9.5",
"@babel/preset-react": "^7.9.4", "@babel/preset-react": "^7.9.4",
"babel-loader": "^9.1.2", "babel-preset-minify": "^0.5.1"
"babel-preset-minify": "^0.5.1",
"webpack": "^5.88.0",
"webpack-cli": "^5.1.4",
"bootstrap": "^4.3.1",
"react-bootstrap": "^1.6.7"
}, },
"babel": { "babel": {
"presets": [ "presets": [

View File

@ -74,7 +74,6 @@
<!-- Load our React component. --> <!-- Load our React component. -->
<!-- <script type="text/babel" src="{{ get_url(path='js/shop.jsx', cachebust=true) }}"></script> --> <!-- <script type="text/babel" src="{{ get_url(path='js/shop.jsx', cachebust=true) }}"></script> -->
<!-- <script src="{{ get_url(path='js/shop.min.js', cachebust=true) }}"></script> --> <script src="{{ get_url(path='js/shop.min.js', cachebust=true) }}"></script>
<script src="{{ get_url(path='js/shop_bundle.js', cachebust=true) }}"></script>
{% endblock %} {% endblock %}

View File

@ -1,19 +0,0 @@
const path = require('path');
module.exports = {
entry: './static/js/shop.min.js', // change this to your entry point
output: {
path: path.resolve(__dirname, './static/js'), // change this to your output path
filename: 'shop_bundle.js'
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: 'babel-loader'
}
]
},
devtool: 'source-map' // optional
};