Use production globals in staging
This commit is contained in:
parent
bbb092d974
commit
e6134b0969
|
@ -9,7 +9,7 @@ import getScripts from '../utils/getScripts';
|
|||
import renderTemplate from '../utils/renderTemplate';
|
||||
|
||||
const globalURLs =
|
||||
process.env.NODE_ENV === 'production'
|
||||
process.env.NODE_ENV === 'production' || process.env.NODE_ENV === 'staging'
|
||||
? {
|
||||
'@emotion/core': '/@emotion/core@10.0.6/dist/core.umd.min.js',
|
||||
react: '/react@16.7.0/umd/react.production.min.js',
|
||||
|
|
|
@ -8,7 +8,7 @@ import getScripts from '../utils/getScripts';
|
|||
import renderTemplate from '../utils/renderTemplate';
|
||||
|
||||
const globalURLs =
|
||||
process.env.NODE_ENV === 'production'
|
||||
process.env.NODE_ENV === 'production' || process.env.NODE_ENV === 'staging'
|
||||
? {
|
||||
'@emotion/core': '/@emotion/core@10.0.6/dist/core.umd.min.js',
|
||||
react: '/react@16.7.0/umd/react.production.min.js',
|
||||
|
|
|
@ -58,50 +58,6 @@ const client = ['main', 'autoIndex'].map(entryName => {
|
|||
};
|
||||
});
|
||||
|
||||
// const client = {
|
||||
// input: ['modules/client/main.js', 'modules/client/autoIndex.js'],
|
||||
// output: [
|
||||
// {
|
||||
// // ESM version for modern browsers
|
||||
// format: 'esm',
|
||||
// dir: 'public/_client',
|
||||
// entryFileNames: '[name]-[hash].js',
|
||||
// chunkFileNames: '[name]-[hash].js'
|
||||
// },
|
||||
// {
|
||||
// // SystemJS version for older browsers
|
||||
// format: 'system',
|
||||
// dir: 'public/_client',
|
||||
// entryFileNames: '[name]-[hash].system.js',
|
||||
// chunkFileNames: '[name]-[hash].system.js'
|
||||
// }
|
||||
// ],
|
||||
// plugins: [
|
||||
// manifest.record({ publicPath: '/_client/' }),
|
||||
// babel({ exclude: /node_modules/ }),
|
||||
// json(),
|
||||
// resolve(),
|
||||
// commonjs({
|
||||
// namedExports: {
|
||||
// 'node_modules/react/index.js': [
|
||||
// 'createContext',
|
||||
// 'createElement',
|
||||
// 'forwardRef',
|
||||
// 'Component',
|
||||
// 'Fragment'
|
||||
// ]
|
||||
// }
|
||||
// }),
|
||||
// replace({
|
||||
// 'process.env.NODE_ENV': JSON.stringify(env)
|
||||
// }),
|
||||
// url({
|
||||
// limit: 5 * 1024,
|
||||
// publicPath: '/_client/'
|
||||
// })
|
||||
// ]
|
||||
// };
|
||||
|
||||
const secretKey = require('./secretKey');
|
||||
const fnsPkg = require('./functions/package.json');
|
||||
|
||||
|
|
Loading…
Reference in New Issue