chore: output blank css files to avoid broken builds (#1724)
This commit is contained in:
@ -45,6 +45,7 @@
|
||||
"netlify-cms-widget-text": "^2.0.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"copy-webpack-plugin": "^4.5.2",
|
||||
"cross-env": "^5.2.0",
|
||||
"friendly-errors-webpack-plugin": "^1.7.0",
|
||||
"webpack": "^4.16.1",
|
||||
|
5
packages/netlify-cms/shims/cms.css
Normal file
5
packages/netlify-cms/shims/cms.css
Normal file
@ -0,0 +1,5 @@
|
||||
/**
|
||||
* Netlify CMS 2.0 moved from static CSS to CSS-in-JS. Some site builds are configured to look
|
||||
* for `cms.css`, and will break when it's missing, so we're putting out this blank file to help.
|
||||
* We'll eventually remove it, so please update your build to not require it.
|
||||
*/
|
@ -1,6 +1,7 @@
|
||||
const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
const FriendlyErrorsWebpackPlugin = require('friendly-errors-webpack-plugin');
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||
const pkg = require('./package.json');
|
||||
const { plugins } = require('../../scripts/webpack');
|
||||
const coreWebpackConfig = require('../netlify-cms-core/webpack.config.js');
|
||||
@ -24,6 +25,7 @@ const baseConfig = {
|
||||
messages: ['Netlify CMS is now running at http://localhost:8080'],
|
||||
},
|
||||
}),
|
||||
new CopyWebpackPlugin([{ from: '../shims/cms.css', to: 'dist/' }]),
|
||||
],
|
||||
devServer: {
|
||||
contentBase: '../../dev-test',
|
||||
@ -44,7 +46,7 @@ if (isProduction) {
|
||||
*/
|
||||
{
|
||||
...baseConfig,
|
||||
entry: [path.join(__dirname, 'scripts/deprecate-old-dist.js'), baseConfig.entry],
|
||||
entry: [path.join(__dirname, 'shims/deprecate-old-dist.js'), baseConfig.entry],
|
||||
output: {
|
||||
...baseConfig.output,
|
||||
filename: 'dist/cms.js',
|
||||
|
Reference in New Issue
Block a user