37 lines
780 B
TypeScript
37 lines
780 B
TypeScript
import type { IWebpackAppConfig } from '@msb/mf-builder';
|
|
import CopyPlugin from 'copy-webpack-plugin';
|
|
import path from 'node:path';
|
|
import packageJson from './package.json';
|
|
|
|
const outputPath = path.resolve(__dirname, '../../msb-host');
|
|
const publicPath = path.resolve(__dirname, 'public');
|
|
|
|
const config: IWebpackAppConfig = {
|
|
moduleName: packageJson.name,
|
|
paths: {
|
|
outputPath,
|
|
publicUrl: '/msb-host/',
|
|
},
|
|
devServerOptions: {
|
|
port: 3001,
|
|
},
|
|
plugins: [
|
|
new CopyPlugin({
|
|
patterns: [
|
|
{
|
|
context: publicPath,
|
|
from: '**/*.json',
|
|
to: outputPath,
|
|
},
|
|
{
|
|
context: publicPath,
|
|
from: '**/*.png',
|
|
to: outputPath,
|
|
},
|
|
],
|
|
}),
|
|
],
|
|
};
|
|
|
|
export default config;
|