Code Monkey home page Code Monkey logo

Comments (3)

iddan avatar iddan commented on May 18, 2024

Thank you for reporting, which tools are you using to build your project?

from react-spreadsheet.

ankitgoyal100 avatar ankitgoyal100 commented on May 18, 2024

Here is my package.json:

{
  "name": "project",
  "version": "1.0.0",
  "description": "",
  "scripts": {
    "start": "webpack --mode development --config webpack.config.js",
    "watch": "webpack --mode development --config webpack.config.js --watch",
    "build": "node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js --mode=production",
    "build:stats": "webpack --mode production --json > stats.json",
    "build:analyze": "webpack-bundle-analyzer stats.json"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "@types/react": "^16.9.27",
    "@types/react-dom": "^16.9.7",
    "awesome-typescript-loader": "^5.2.1",
    "clean-webpack-plugin": "^3.0.0",
    "compression-webpack-plugin": "^6.1.1",
    "css-loader": "^5.0.1",
    "mini-css-extract-plugin": "^1.3.1",
    "source-map-loader": "^1.1.2",
    "typescript": "^4.1.2",
    "webpack": "^5.6.0",
    "webpack-bundle-tracker": "^1.0.0-alpha.1",
    "webpack-cli": "^4.2.0",
    "webpack-dev-server": "^3.11.0"
  },
  "dependencies": {
    "axios": "^0.21.0",
    "bootstrap": "^4.5.3",
    "history": "^5.0.0",
    "node-sass": "^5.0.0",
    "papaparse": "^5.3.0",
    "react": "^17.0.1",
    "react-bootstrap": "^1.4.0",
    "react-dom": "^17.0.1",
    "react-redux": "^7.2.2",
    "react-router-dom": "^5.2.0",
    "react-spreadsheet": "^0.5.0",
    "redux": "^4.0.5",
    "redux-thunk": "^2.3.0"
  }
}

Here is my tsconfig.json:

{
  "compilerOptions": {
    "jsx": "react",
    "module": "esnext",
    "noImplicitAny": false,
    "outDir": "./build/",
    "preserveConstEnums": true,
    "removeComments": true,
    "sourceMap": true,
    "target": "es5",
    "esModuleInterop": true,
    "moduleResolution": "node"
  },
  "include": [
    "./frontend/src/*"
  ]
}

Here is my webpack.config.json:

const path = require("path");
var BundleTracker = require('webpack-bundle-tracker');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const CompressionPlugin = require('compression-webpack-plugin');

module.exports = {
  entry: {
    index: path.join(__dirname, 'frontend/src/index.tsx')
  },
  target: "web",
  output: {
    path: path.join(__dirname, "project/static/dist"),
    publicPath: "/static/",
    filename: '[name].js',
    chunkFilename: "[id]-[chunkhash].js",
  },
  plugins: [
    new CleanWebpackPlugin(),
    new BundleTracker({
      path: __dirname,
      filename: 'webpack-stats.json'
    }),
    new MiniCssExtractPlugin({
      filename: '[name].css',
      chunkFilename: '[id].[chunkhash].css',
    }),
    // Use to replace MomentJS - reducing bundle size
    new CompressionPlugin(),
  ],
  resolve: {
    extensions: [".js", ".jsx", ".json", ".ts", ".tsx"],
  },
  module: {
    rules: [
      {
        test: /\.(ts|tsx)$/,
        loader: "awesome-typescript-loader",
        exclude: /node_modules/,
      },
      {
        test: /\.(scss|css)$/,
        use: [MiniCssExtractPlugin.loader, 'css-loader'],
      },
    ],
  },
  stats: {
    children: false
  },
};

from react-spreadsheet.

iddan avatar iddan commented on May 18, 2024

This is solved with [email protected]

from react-spreadsheet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.