2017-09-07 04:40:26 +02:00
|
|
|
const Path = require('path');
|
2023-01-30 02:00:46 +01:00
|
|
|
const { JavascriptWebpackConfig, CssWebpackConfig } = require('@silverstripe/webpack-config');
|
2017-09-07 04:40:26 +02:00
|
|
|
|
|
|
|
const ENV = process.env.NODE_ENV;
|
|
|
|
const PATHS = {
|
|
|
|
ROOT: Path.resolve(),
|
|
|
|
SRC: Path.resolve('client/src'),
|
|
|
|
DIST: Path.resolve('client/dist'),
|
|
|
|
};
|
|
|
|
|
|
|
|
const config = [
|
2023-01-30 02:00:46 +01:00
|
|
|
// Main JS bundle
|
|
|
|
new JavascriptWebpackConfig('js', PATHS, 'silverstripe/contentreview')
|
|
|
|
.setEntry({
|
2017-09-07 04:40:26 +02:00
|
|
|
contentreview: `${PATHS.SRC}/bundles/bundle.js`,
|
2023-01-30 02:00:46 +01:00
|
|
|
})
|
|
|
|
.getConfig(),
|
|
|
|
// sass to css
|
|
|
|
new CssWebpackConfig('css', PATHS)
|
|
|
|
.setEntry({
|
2017-09-07 04:40:26 +02:00
|
|
|
contentreview: `${PATHS.SRC}/styles/bundle.scss`,
|
2023-01-30 02:00:46 +01:00
|
|
|
})
|
|
|
|
.getConfig(),
|
2017-09-07 04:40:26 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
module.exports = config;
|