feat: provide usable UMD builds for all packages (#2141)
This commit is contained in:
committed by
Shawn Erquhart
parent
1d935c704d
commit
82cc7941cc
@ -1,3 +1,4 @@
|
||||
const path = require('path');
|
||||
const isProduction = process.env.NODE_ENV === 'production';
|
||||
const isTest = process.env.NODE_ENV === 'test';
|
||||
|
||||
@ -29,6 +30,24 @@ const plugins = () => {
|
||||
'@babel/plugin-proposal-class-properties',
|
||||
'@babel/plugin-proposal-object-rest-spread',
|
||||
'@babel/plugin-proposal-export-default-from',
|
||||
[
|
||||
'module-resolver',
|
||||
{
|
||||
root: path.join(__dirname, 'packages/netlify-cms-core/src/components'),
|
||||
alias: {
|
||||
coreSrc: path.join(__dirname, 'packages/netlify-cms-core/src'),
|
||||
Actions: path.join(__dirname, 'packages/netlify-cms-core/src/actions/'),
|
||||
Constants: path.join(__dirname, 'packages/netlify-cms-core/src/constants/'),
|
||||
Formats: path.join(__dirname, 'packages/netlify-cms-core/src/formats/'),
|
||||
Integrations: path.join(__dirname, 'packages/netlify-cms-core/src/integrations/'),
|
||||
Lib: path.join(__dirname, 'packages/netlify-cms-core/src/lib/'),
|
||||
Reducers: path.join(__dirname, 'packages/netlify-cms-core/src/reducers/'),
|
||||
Redux: path.join(__dirname, 'packages/netlify-cms-core/src/redux/'),
|
||||
Routing: path.join(__dirname, 'packages/netlify-cms-core/src/routing/'),
|
||||
ValueObjects: path.join(__dirname, 'packages/netlify-cms-core/src/valueObjects/'),
|
||||
},
|
||||
},
|
||||
],
|
||||
];
|
||||
|
||||
if (isProduction) {
|
||||
@ -65,6 +84,7 @@ const plugins = () => {
|
||||
];
|
||||
}
|
||||
|
||||
defaultPlugins.push('react-hot-loader/babel');
|
||||
return [
|
||||
...defaultPlugins,
|
||||
[
|
||||
|
Reference in New Issue
Block a user