/
outthevoid
/
frontend_developer_module_2
Обзор
Документация
Войти
/
outthevoid
/
frontend_developer_module_2
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
webpack.config/webpack.common.js
43 строки
1 KB
darthmorgot
Исправил код в связи с удалением ненужных плагинов.
29 окт 2023, 14:39
29 окт 2023, 14:39
98f4da0
Код
Авторство
О чём код?
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 + '/img/', Fonts: path.src + '/fonts/', }, preferRelative: true, }, plugins: [ pugPlugin(devMode), ], module: { rules: [ htmlPreset(), devMode ? stylePreset() : stylePresetProd(), scriptPreset(), imagePreset(devMode), fontPreset(devMode), ], }, };