Use npm build
This commit is contained in:
parent
a8c4bde46d
commit
b0e2dbbbb4
2
index.html → dist/index.html
vendored
2
index.html → dist/index.html
vendored
@ -1,6 +1,6 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<script src="test1.js"></script>
|
<script src="bundle.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
</body>
|
</body>
|
@ -1,3 +1,3 @@
|
|||||||
document.write("<link rel=\"stylesheet\" href=\"gh-fork-ribbon.css\">");
|
require('./gh-fork-ribbon.css');
|
||||||
|
|
||||||
document.write("<div><a href=\"https://caracals.org\" class=\"cara-logo right-bottom fixed\" title=\"Visiter le site des Caracals\">Visiter le site des Caracals</a></div>");
|
document.write("<div><a href=\"https://caracals.org\" class=\"cara-logo right-bottom fixed\" title=\"Visiter le site des Caracals\">Visiter le site des Caracals</a></div>");
|
1213
package-lock.json
generated
Normal file
1213
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
20
package.json
Normal file
20
package.json
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"name": "js-include",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "",
|
||||||
|
"main": "./bundle.js",
|
||||||
|
"scripts": {
|
||||||
|
"dev": "webpack --mode='development'",
|
||||||
|
"build": "webpack -p"
|
||||||
|
},
|
||||||
|
"author": "",
|
||||||
|
"license": "ISC",
|
||||||
|
"devDependencies": {
|
||||||
|
"css-loader": "^5.1.3",
|
||||||
|
"webpack": "^5.26.2",
|
||||||
|
"webpack-cli": "^4.5.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"style-loader": "^2.0.0"
|
||||||
|
}
|
||||||
|
}
|
14
webpack.config.js
Normal file
14
webpack.config.js
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
module.exports = {
|
||||||
|
entry: './main.js',
|
||||||
|
output: {
|
||||||
|
filename: './bundle.js'
|
||||||
|
},
|
||||||
|
module: {
|
||||||
|
rules:[
|
||||||
|
{
|
||||||
|
test: /\.css$/,
|
||||||
|
use: [ 'style-loader', 'css-loader' ]
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user