Skip to content

How can I add webpack support? #51

@Macrow

Description

@Macrow

here is my webpack.config.js

const path = require('path');

module.exports = {
  mode: 'production',
  context: __dirname,
  target: 'node',
  entry: {
    server: './server/index.ts',
  },
  output: {
    path: path.resolve(__dirname, 'build'),
    filename: '[name].[chunkhash].js',
  },
  resolve: {
    extensions: ['.ts', '.tsx', '.js'],
    fallback: {
      assert: false,
      buffer: false,
      crypto: false,
      fs: false,
      http: false,
      https: false,
      net: false,
      os: false,
      path: false,
      querystring: false,
      stream: false,
      url: false,
      util: false,
      zlib: false,
    },
  },
  module: {
    rules: [
      {
        test: /\.tsx?$/,
        loader: 'ts-loader',
        exclude: /node_modules/,
      },
    ],
  },
};

after packed by webpack, the app not working, :(

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions