<img src="img/mail.svg" alt="За стеклом" width="30px;" height="30px;" style="color: red;">
Но невольное саморазоблачение получилось на пять баллов
Уже помог. Когда вы опубликовали этот вопрос в первый раз, я предложил ссылку на решённый вопрос с косяком, аналогичным вашему.
module: {
rules: [
{
test: /\.css$/,
use: [MiniCssExtractPlugin.loader, 'css-loader']
},
{
test: /\.less$/,
use: [MiniCssExtractPlugin.loader, 'css-loader', 'less-loader']
},
// ТО ЧТО ДОБАВИЛ
{
loader: 'css-loader', options: {
sourceMap: true, modules: true,
localIdentName: '[local]_[hash:base64:5]'
}
},
{
loader: 'postcss-loader',
options: {
sourceMap: true,
config: {
path: 'postcss.config.js'
}
}
},
{
loader: 'sass-loader', options: { sourceMap: true }
},
// Конец
{
test: /\.scss$/,
use: [MiniCssExtractPlugin.loader, 'css-loader', 'sass-loader']
},
{
test: /\.(js|ts)$/,
exclude: /node_modules/,
loader: "babel-loader"
}
]
}
Insufficient number of arguments or no entry found.
Alternatively, run 'webpack(-cli) --help' for usage info.
Hash: 9b0580e2781cd65be4e2
Version: webpack 4.44.2
Time: 329ms
Built at: 2020-12-19 01:07:40
ERROR in Entry module not found: Error: Can't resolve 'sass-loader' in 'C:\Users\Алексей\Desktop\Voyage'
ERROR in Error: Child compilation failed:
Entry module not found: Error: Can't resolve 'sass-loader' in 'C:\Users\Алексей\Desktop\Voyage':
Error: Can't resolve 'sass-loader' in 'C:\Users\Алексей\Desktop\Voyage'
- compiler.js:79 childCompiler.runAsChild
[Voyage]/[html-webpack-plugin]/lib/compiler.js:79:16
- Compiler.js:343 compile
[Voyage]/[webpack]/lib/Compiler.js:343:11
- Compiler.js:681 hooks.afterCompile.callAsync.err
[Voyage]/[webpack]/lib/Compiler.js:681:15
- Hook.js:154 AsyncSeriesHook.lazyCompileHook
[Voyage]/[tapable]/lib/Hook.js:154:20
- Compiler.js:678 compilation.seal.err
[Voyage]/[webpack]/lib/Compiler.js:678:31
- Hook.js:154 AsyncSeriesHook.lazyCompileHook
[Voyage]/[tapable]/lib/Hook.js:154:20
- Compilation.js:1423 hooks.optimizeAssets.callAsync.err
[Voyage]/[webpack]/lib/Compilation.js:1423:35
- Hook.js:154 AsyncSeriesHook.lazyCompileHook
[Voyage]/[tapable]/lib/Hook.js:154:20
- Compilation.js:1414 hooks.optimizeChunkAssets.callAsync.err
[Voyage]/[webpack]/lib/Compilation.js:1414:32
- index.js:321 taskRunner.run
[Voyage]/[uglifyjs-webpack-plugin]/dist/index.js:321:9
- TaskRunner.js:46 TaskRunner.run
[Voyage]/[uglifyjs-webpack-plugin]/dist/TaskRunner.js:46:7
- index.js:227 UglifyJsPlugin.optimizeFn
[Voyage]/[uglifyjs-webpack-plugin]/dist/index.js:227:18
- next_tick.js:68 process._tickCallback
internal/process/next_tick.js:68:7
Child html-webpack-plugin for "index.html":
ERROR in Entry module not found: Error: Can't resolve 'sass-loader' in 'C:\Users\Алексей\Desktop\Voyage'
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! test@1.0.0 build: webpack --mode production --open
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the test@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Алексей\AppData\Roaming\npm-cache\_logs\2020-12-18T23_07_41_390Z-debug.log
{
"name": "test",
"version": "1.0.0",
"description": "only for test from webformyself",
"main": "index.js",
"scripts": {
"dev": "webpack-dev-server --mode development --open",
"build": "webpack --mode production --open"
},
"keywords": [
"javascript"
],
"author": "Alexei",
"license": "ISC",
"devDependencies": {
"@babel/cli": "^7.12.1",
"@babel/core": "^7.12.3",
"@babel/preset-env": "^7.12.1",
"autoprefixer": "^10.1.0",
"babel-loader": "^8.1.0",
"css-loader": "^3.6.0",
"file-loader": "^4.3.0",
"html-webpack-plugin": "^3.2.0",
"less": "^3.12.2",
"less-loader": "^5.0.0",
"mini-css-extract-plugin": "^0.8.2",
"optimize-css-assets-webpack-plugin": "^5.0.4",
"postcss-loader": "^4.1.0",
"smart-grid": "^2.1.2",
"style-loader": "^1.3.0",
"uglifyjs-webpack-plugin": "^2.2.0",
"webpack": "^4.44.2",
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.0"
},
"dependencies": {
"@babel/polyfill": "^7.12.1",
"@popperjs/core": "^2.5.4",
"bootstrap": "^4.5.3",
"jquery": "^3.5.1",
"popper.js": "^1.16.1"
},
"browserslist": [
"defaults",
"not ie < 11",
"last 2 versions",
"> 1%",
"iOS 7",
"last 3 iOS versions"
]
}