static asset generation restructured and reconfigured.
This commit is contained in:
parent
d91acd36f7
commit
4de4e8dfa1
@ -1,5 +1,2 @@
|
||||
|
||||
|
||||
// Site-wide JS imports:
|
||||
import "~/node_modules/bootstrap/js/dist/collapse";
|
||||
import "simplebar";
|
2
Props/assets/styles/dependencies.css
Normal file
2
Props/assets/styles/dependencies.css
Normal file
@ -0,0 +1,2 @@
|
||||
@import "~/node_modules/bootstrap-icons/font/bootstrap-icons.css";
|
||||
@import "~/node_modules/simplebar/dist/simplebar.min.css";
|
@ -116,9 +116,4 @@ body {
|
||||
background-color: themer.color-of("background");
|
||||
color: themer.color-of("text");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Site-wide css imports:
|
||||
@import "~/node_modules/bootstrap-icons/font/bootstrap-icons.css";
|
||||
@import "~/node_modules/simplebar/dist/simplebar.min.css";
|
||||
}
|
18
Props/package-lock.json
generated
18
Props/package-lock.json
generated
@ -2000,9 +2000,9 @@
|
||||
}
|
||||
},
|
||||
"css-loader": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.1.0.tgz",
|
||||
"integrity": "sha512-AcCb6ire7NgkrxJCtwEDa/y+xxBrPNXYWdlSpXNr+YwW2wTahSowSIxD9cHc9Uvc8Dbq+NQ/NQ6aDvJWik44vg==",
|
||||
"version": "6.2.0",
|
||||
"resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.2.0.tgz",
|
||||
"integrity": "sha512-/rvHfYRjIpymZblf49w8jYcRo2y9gj6rV8UroHGmBxKrIyGLokpycyKzp9OkitvqT29ZSpzJ0Ic7SpnJX3sC8g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"icss-utils": "^5.1.0",
|
||||
@ -3137,9 +3137,9 @@
|
||||
}
|
||||
},
|
||||
"postcss": {
|
||||
"version": "8.3.5",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.3.5.tgz",
|
||||
"integrity": "sha512-NxTuJocUhYGsMiMFHDUkmjSKT3EdH4/WbGF6GCi1NDGk+vbcUTun4fpbOqaPtD8IIsztA2ilZm2DhYCuyN58gA==",
|
||||
"version": "8.3.6",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.3.6.tgz",
|
||||
"integrity": "sha512-wG1cc/JhRgdqB6WHEuyLTedf3KIRuD0hG6ldkFEZNCjRxiC+3i6kkWUUbiJQayP28iwG35cEmAbe98585BYV0A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"colorette": "^1.2.2",
|
||||
@ -3583,9 +3583,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"style-loader": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/style-loader/-/style-loader-3.1.0.tgz",
|
||||
"integrity": "sha512-HYVvBMX3RX7zx71pquZV6EcnPN7Deba+zQteSxCLqt3bxYRphmeMr+2mZMrIZjZ7IMa6aOUhNGn8cXGvWMjClw==",
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/style-loader/-/style-loader-3.2.1.tgz",
|
||||
"integrity": "sha512-1k9ZosJCRFaRbY6hH49JFlRB0fVSbmnyq1iTPjNxUmGVjBNEmwrrHPenhlp+Lgo51BojHSf6pl2FcqYaN3PfVg==",
|
||||
"dev": true
|
||||
},
|
||||
"style-value-types": {
|
||||
|
@ -17,12 +17,12 @@
|
||||
"babel-eslint": "^10.1.0",
|
||||
"babel-loader": "^8.2.2",
|
||||
"copy-webpack-plugin": "^9.0.1",
|
||||
"css-loader": "^6.1.0",
|
||||
"css-loader": "^6.2.0",
|
||||
"eslint": "^7.31.0",
|
||||
"glob": "^7.1.7",
|
||||
"sass": "^1.35.2",
|
||||
"sass-loader": "^12.1.0",
|
||||
"style-loader": "^3.1.0",
|
||||
"style-loader": "^3.2.1",
|
||||
"webpack": "^5.45.1",
|
||||
"webpack-cli": "^4.7.2",
|
||||
"webpack-merge": "^5.8.0"
|
||||
@ -35,4 +35,4 @@
|
||||
"popmotion": "^9.4.0",
|
||||
"simplebar": "^5.3.5"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9,22 +9,15 @@ let config = {
|
||||
obj[name] = elem;
|
||||
return obj;
|
||||
}, {
|
||||
site: [path.resolve("./assets/js/main.js"), path.resolve("./assets/scss/main.scss")],
|
||||
site: [path.resolve("./assets/js/site-wide.js"), path.resolve("./assets/styles/site-wide.scss"), path.resolve("./assets/styles/dependencies.css")],
|
||||
}),
|
||||
output: {
|
||||
filename: "[name].js",
|
||||
path: path.resolve("./wwwroot/js"),
|
||||
clean: true,
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.s[ac]ss$/i,
|
||||
use: [
|
||||
"style-loader",
|
||||
"css-loader",
|
||||
"sass-loader",
|
||||
],
|
||||
},
|
||||
{
|
||||
test: /\.m?js$/,
|
||||
exclude: /(node_modules|bower_components)/,
|
||||
@ -36,10 +29,26 @@ let config = {
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
test: /\.s[ac]ss$/i,
|
||||
use: [
|
||||
"style-loader",
|
||||
"css-loader",
|
||||
"sass-loader",
|
||||
],
|
||||
},
|
||||
{
|
||||
test: /\.css$/i,
|
||||
use: ["style-loader", "css-loader"],
|
||||
},
|
||||
{
|
||||
test: /\.(png|svg|jpg|jpeg|gif)$/i,
|
||||
type: "asset/resource",
|
||||
}
|
||||
},
|
||||
{
|
||||
test: /\.(woff|woff2|eot|ttf|otf)$/i,
|
||||
type: "asset/resource",
|
||||
},
|
||||
]
|
||||
},
|
||||
resolve: {
|
||||
|
@ -3,7 +3,18 @@ const common = require("./webpack.common");
|
||||
|
||||
let config = {
|
||||
mode: "development",
|
||||
devtool: "eval-source-map",
|
||||
devtool: "eval-cheap-module-source-map",
|
||||
output: {
|
||||
pathinfo: false,
|
||||
},
|
||||
optimization: {
|
||||
removeAvailableModules: false,
|
||||
removeEmptyChunks: false,
|
||||
mergeDuplicateChunks: false,
|
||||
providedExports: false,
|
||||
splitChunks: false,
|
||||
innerGraph: false,
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = merge(common, config);
|
||||
|
@ -4,6 +4,11 @@ const common = require("./webpack.common");
|
||||
let config = {
|
||||
mode: "production",
|
||||
devtool: "nosources-source-map",
|
||||
optimization: {
|
||||
mangleExports: "size",
|
||||
moduleIds: "size",
|
||||
chunkIds: "size",
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = merge(common, config);
|
||||
|
Loading…
x
Reference in New Issue
Block a user