26 lines
604 B
JavaScript
26 lines
604 B
JavaScript
const path = require('path');
|
|
const { createConfig } = require('@openedx/frontend-build');
|
|
const CopyPlugin = require('copy-webpack-plugin');
|
|
|
|
const config = createConfig('webpack-prod');
|
|
|
|
config.resolve.modules = [
|
|
path.resolve(__dirname, './src'),
|
|
'node_modules',
|
|
];
|
|
|
|
config.module.rules[0].exclude = /node_modules\/(?!(split-on-first|strict-uri-encode|@edx))/;
|
|
|
|
config.plugins.push(
|
|
new CopyPlugin({
|
|
patterns: [
|
|
{
|
|
from: path.resolve(__dirname, './public/robots.txt'),
|
|
to: path.resolve(__dirname, './dist/robots.txt'),
|
|
},
|
|
],
|
|
}),
|
|
);
|
|
|
|
module.exports = config;
|