/
outthevoid
/
frontend_developer
Обзор
Документация
Войти
/
outthevoid
/
frontend_developer
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
webpack.config/webpack.common.js
42 строки
1 KB
darthmorgot
Исправил название подключаемого модуля
05 июл 2023, 15:36
05 июл 2023, 15:36
9f64719
Код
Авторство
О чём код?
const path = require('./paths.js'); const multipage = require('./webpack.multipage.js'); const pugPlugin = require('./plugins/pug-plugin-module.js'); const htmlPreset = require('./presets/html-preset-common.js'); const stylePreset = require('./presets/style-preset-common.js'); const stylePresetProd = require('./presets/style-preset-prod.js'); const scriptPreset = require('./presets/script-preset-common.js'); const imagePreset = require('./presets/image-preset-common.js'); const fontPreset = require('./presets/font-preset-common.js'); const devMode = process.env.BUILD_TYPE !== "production"; module.exports = { entry: { ...multipage.entry }, output: { path: path.build, publicPath: '/', clean: true }, resolve: { alias: { Images: path.src + '/images/', Fonts: path.src + '/fonts/', } }, plugins: [ pugPlugin(devMode), ], module: { rules: [ htmlPreset(), devMode ? stylePreset() : stylePresetProd(), scriptPreset(), imagePreset(devMode), fontPreset(devMode), ] }, };