плагин вроде как копирует, но нечего не копирует.... что я делаю не так?
const path = require('path')
const CopyPlugin = require("copy-webpack-plugin");
const {CleanWebpackPlugin} = require("clean-webpack-plugin")
module.exports ={
entry: {
filename: path.resolve(__dirname, 'src/js/test.js')
},
output: {
filename: 'bulder.js',
path: path.resolve(__dirname, 'dist')
},
devServer:{
port: 9000,
compress: true,
hot: true,
static: {
directory: path.join(__dirname, 'dist')
}
},
plugins: [
//new CleanWebpackPlugin(),
new CopyPlugin({
patterns: [
{
context: path.join(__dirname),
from: 'static',
to: 'dist'
},
// {
// from: path.resolve(__dirname, 'src'),
// to: path.resolve(__dirname, 'dist')
// },
],
}),
],
}
ниже консоль
PS C:\OpenServer\domains\three> npm run dev
> y@1.0.0 dev C:\OpenServer\domains\three
> webpack serve --mode development
<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: http://localhost:9000/
<i> [webpack-dev-server] On Your Network (IPv4): http://192.168.1.3:9000/
<i> [webpack-dev-server] Content not from webpack is served from 'C:\OpenServer\domains\three\dist' directory
assets by path dist/*.jpg 974 KiB
asset dist/Stylized_Fur_002_ambientOcclusion.jpg 344 KiB [emitted] [from: static/Stylized_Fur_002_ambientOcclusion.jpg] [copied]
asset dist/Stylized_Fur_002_normal.jpg 312 KiB [emitted] [from: static/Stylized_Fur_002_normal.jpg] [copied]
asset dist/Stylized_Fur_002_basecolor.jpg 184 KiB [emitted] [from: static/Stylized_Fur_002_basecolor.jpg] [copied]
asset dist/Material_2072.jpg 128 KiB [emitted] [from: static/Material_2072.jpg] [copied]
asset dist/Stylized_Fur_002_roughness.jpg 6.51 KiB [emitted] [from: static/Stylized_Fur_002_roughness.jpg] [copied]
asset bulder.js 1.95 MiB [emitted] (name: filename)
asset dist/Stylized_Fur_002_height.png 676 KiB [emitted] [from: static/Stylized_Fur_002_height.png] [copied]
runtime modules 27.3 KiB 12 modules
modules by path ./node_modules/ 1.68 MiB
modules by path ./node_modules/webpack-dev-server/client/ 68.9 KiB 16 modules
modules by path ./node_modules/webpack/hot/*.js 4.59 KiB 4 modules
modules by path ./node_modules/html-entities/lib/*.js 81.3 KiB 4 modules
modules by path ./node_modules/three/ 1.21 MiB
./node_modules/three/build/three.module.js 1.14 MiB [built] [code generated]
+ 2 modules
modules by path ./node_modules/gsap/*.js 224 KiB
./node_modules/gsap/index.js 664 bytes [built] [code generated]
+ 2 modules
./node_modules/dat.gui/build/dat.gui.module.js 84.8 KiB [built] [code generated]
./node_modules/ansi-html-community/index.js 4.16 KiB [built] [code generated]
./node_modules/events/events.js 14.5 KiB [built] [code generated]
./src/js/test.js 3.72 KiB [built] [code generated]
webpack 5.77.0 compiled successfully in 2212 ms