remix.config.js 636 B

123456789101112131415161718192021222324
  1. const {withEsbuildOverride} = require('remix-esbuild-override');
  2. const GlobalsPolyfills = require('@esbuild-plugins/node-globals-polyfill').default;
  3. withEsbuildOverride((option, {isServer}) => {
  4. if (isServer) {
  5. option.plugins = [
  6. GlobalsPolyfills({
  7. process: 'process/browser',
  8. }),
  9. ...option.plugins,
  10. ];
  11. }
  12. return option;
  13. });
  14. module.exports = {
  15. appDirectory: 'app',
  16. assetsBuildDirectory: 'public/build',
  17. ignoredRouteFiles: ['**/.*'],
  18. publicPath: '/build/',
  19. serverBuildPath: 'build/index.js',
  20. serverBuildTarget: 'node-cjs',
  21. serverDependenciesToBundle: ['copy-text-to-clipboard'],
  22. };