feat: rolled back on webpack
This commit is contained in:
parent
3cb7dbeeb1
commit
643420d6ce
4532
package-lock.json
generated
4532
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
24
package.json
24
package.json
@ -3,23 +3,19 @@
|
|||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "webpack --mode=production",
|
"build": "run-p build:*",
|
||||||
"serve": "webpack-dev-server --port 3000 --hot --host 0.0.0.0 --mode=development"
|
"build:css": "node-sass ./src/styles/_index.scss dist/styles.css",
|
||||||
|
"build:js": "babel 'src/scripts/*.js' -o dist/app.js",
|
||||||
|
"build:html": "pug src/index.pug -o dist/ --obj config.json"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/core": "^7.6.4",
|
"@babel/cli": "^7.7.0",
|
||||||
"babel-loader": "^8.0.6",
|
"@babel/core": "^7.7.0",
|
||||||
"css-loader": "^3.2.0",
|
"include-media": "^1.4.9",
|
||||||
"file-loader": "^4.2.0",
|
|
||||||
"html-loader": "^0.5.5",
|
|
||||||
"html-webpack-plugin": "^3.2.0",
|
|
||||||
"mini-css-extract-plugin": "^0.8.0",
|
|
||||||
"node-sass": "^4.13.0",
|
"node-sass": "^4.13.0",
|
||||||
|
"normalize.css": "^8.0.1",
|
||||||
|
"npm-run-all": "^4.1.5",
|
||||||
"pug": "^2.0.4",
|
"pug": "^2.0.4",
|
||||||
"pug-html-loader": "^1.1.5",
|
"pug-cli": "^1.0.0-alpha6"
|
||||||
"sass-loader": "^8.0.0",
|
|
||||||
"webpack": "^4.41.2",
|
|
||||||
"webpack-cli": "^3.3.9",
|
|
||||||
"webpack-dev-server": "^3.9.0"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,76 +0,0 @@
|
|||||||
const path = require('path');
|
|
||||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
||||||
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
|
||||||
|
|
||||||
const config = {
|
|
||||||
entry: {
|
|
||||||
app: './src/scripts/index.js'
|
|
||||||
},
|
|
||||||
output: {
|
|
||||||
path: path.resolve(__dirname, 'dist'),
|
|
||||||
filename: "[name].bundle.js",
|
|
||||||
},
|
|
||||||
plugins: [
|
|
||||||
new HtmlWebpackPlugin({
|
|
||||||
template: './src/index.pug'
|
|
||||||
}),
|
|
||||||
new MiniCssExtractPlugin({
|
|
||||||
filename: "style.css"
|
|
||||||
})
|
|
||||||
],
|
|
||||||
module: {
|
|
||||||
rules: [
|
|
||||||
{
|
|
||||||
test: /\.pug$/,
|
|
||||||
use: [
|
|
||||||
{ loader: "html-loader" },
|
|
||||||
{ loader: "pug-html-loader",
|
|
||||||
options: {
|
|
||||||
data: {
|
|
||||||
cdn: "https://cdn.happy-dev.fr",
|
|
||||||
xmpp: "https://jabber.happy-dev.fr/http-bind/",
|
|
||||||
authority: "http://127.0.0.1:8000/openid/",
|
|
||||||
endpoints: {
|
|
||||||
businessproviders: "http://127.0.0.1:8000/businessproviders/",
|
|
||||||
circles: "http://127.0.0.1:8000/circles/",
|
|
||||||
groups: "http://127.0.0.1:8000/groups/",
|
|
||||||
joboffers: "http://127.0.0.1:8000/job-offers/",
|
|
||||||
projects: "http://127.0.0.1:8000/projects/",
|
|
||||||
skills: "http://127.0.0.1:8000/skills/",
|
|
||||||
users: "http://127.0.0.1:8000/users/"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
test: /\.js$/,
|
|
||||||
exclude: /node_modules/,
|
|
||||||
use: "babel-loader"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
test: /\.scss$/,
|
|
||||||
use: [
|
|
||||||
MiniCssExtractPlugin.loader,
|
|
||||||
{ loader: 'css-loader', options: { url: false, sourceMap: true } },
|
|
||||||
{ loader: 'sass-loader', options: { sourceMap: true } }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
test: /\.(gif|png|jpe?g|svg)$/i,
|
|
||||||
use: 'file-loader'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
test: /\.(eot|ttf|woff|woff2)$/,
|
|
||||||
loader: 'file-loader',
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
module.exports = (env, argv) => {
|
|
||||||
if (argv.mode === 'development') {}
|
|
||||||
if (argv.mode === 'production') {}
|
|
||||||
return config;
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user