diff --git a/modules/actions/serveAutoIndexPage.js b/modules/actions/serveAutoIndexPage.js index c6a867d..81c13cb 100644 --- a/modules/actions/serveAutoIndexPage.js +++ b/modules/actions/serveAutoIndexPage.js @@ -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', diff --git a/modules/actions/serveMainPage.js b/modules/actions/serveMainPage.js index 83eaf89..9061cba 100644 --- a/modules/actions/serveMainPage.js +++ b/modules/actions/serveMainPage.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', diff --git a/rollup.config.js b/rollup.config.js index c3bd718..8ac0000 100644 --- a/rollup.config.js +++ b/rollup.config.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');