2018-07-25 05:37:38 -04:00
|
|
|
const path = require('path');
|
|
|
|
const coreWebpackConfig = require('../netlify-cms-core/webpack.config.js');
|
2018-07-23 23:40:48 -04:00
|
|
|
|
2018-07-27 11:08:17 -04:00
|
|
|
module.exports = [
|
|
|
|
{
|
|
|
|
...coreWebpackConfig,
|
|
|
|
context: path.join(__dirname, 'src'),
|
|
|
|
entry: './index.js',
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Output the same script a second time, but named `cms.js`, and with a
|
|
|
|
* deprecation notice.
|
|
|
|
*/
|
|
|
|
{
|
|
|
|
...coreWebpackConfig,
|
|
|
|
context: path.join(__dirname, 'src'),
|
|
|
|
entry: [
|
|
|
|
...coreWebpackConfig.entry,
|
|
|
|
path.join(__dirname, 'scripts/deprecate-old-dist.js'),
|
|
|
|
],
|
|
|
|
output: {
|
|
|
|
...coreWebpackConfig.output,
|
|
|
|
filename: 'dist/cms.js',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
];
|