mirror of
https://github.com/silverstripe/silverstripe-contentreview
synced 2024-10-22 17:05:47 +02:00
27 lines
662 B
JavaScript
27 lines
662 B
JavaScript
const Path = require('path');
|
|
const { JavascriptWebpackConfig, CssWebpackConfig } = require('@silverstripe/webpack-config');
|
|
|
|
const ENV = process.env.NODE_ENV;
|
|
const PATHS = {
|
|
ROOT: Path.resolve(),
|
|
SRC: Path.resolve('client/src'),
|
|
DIST: Path.resolve('client/dist'),
|
|
};
|
|
|
|
const config = [
|
|
// Main JS bundle
|
|
new JavascriptWebpackConfig('js', PATHS, 'silverstripe/contentreview')
|
|
.setEntry({
|
|
contentreview: `${PATHS.SRC}/bundles/bundle.js`,
|
|
})
|
|
.getConfig(),
|
|
// sass to css
|
|
new CssWebpackConfig('css', PATHS)
|
|
.setEntry({
|
|
contentreview: `${PATHS.SRC}/styles/bundle.scss`,
|
|
})
|
|
.getConfig(),
|
|
];
|
|
|
|
module.exports = config;
|