/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/configCases/module/non-webpack-require/webpack.config.js
60 строк
1 KB
Alexander Akait
style: set `arrowParens` to `true` (#19706)
16 июл 2025, 19:13
Не верифицирован
16 июл 2025, 19:13
703d9ac
Код
Авторство
О чём код?
"use strict"; const webpack = require("../../../../"); /** @type {import("../../../../").Configuration} */ module.exports = { target: ["node", "es2020"], experiments: { outputModule: true }, output: { module: true, iife: true }, externals: { "external-module": "node-commonjs external-module", "external-other-module": ["node-commonjs external-module"] }, optimization: { concatenateModules: false }, plugins: [ { apply(compiler) { compiler.hooks.compilation.tap("Test", (compilation) => { compilation.hooks.processAssets.tap( { name: "copy-webpack-plugin", stage: compiler.webpack.Compilation.PROCESS_ASSETS_STAGE_ADDITIONAL }, () => { compilation.emitAsset( "mod.js", new webpack.sources.RawSource( "module.exports = 'module text';\n" ) ); } ); compilation.hooks.processAssets.tap( { name: "copy-webpack-plugin", stage: compiler.webpack.Compilation.PROCESS_ASSETS_STAGE_ADDITIONAL }, () => { compilation.emitAsset( "node_modules/external-module/index.js", new webpack.sources.RawSource( "module.exports = 'external module text';\n" ) ); } ); }); } } ] };