Giter Site home page Giter Site logo

Comments (5)

enuchi avatar enuchi commented on July 29, 2024

@mx2323 I assume you're trying to debug the server code, right?

You're right, webpack --mode development doesn't work. Thanks for pointing this out . I just updated the repo to remove this from the package start script. Try using production mode to build again (npm run build) but first adding or changing minimize: true to minimize: false on this line in the webpack config.

PR:
https://github.com/enuchi/React-Google-Apps-Script/pull/36/files
See comment: #36 (comment)

Reason development mode doesn't work in gas-webpack-plugin:
fossamagna/gas-webpack-plugin#135

It's still recommended you use minify: true in actual production to reduce bundle size but agree it is difficult to debug. Would like to at some point to add a convenient way to get sourcemaps in this repo but that is a bigger project.

from react-google-apps-script.

mx2323 avatar mx2323 commented on July 29, 2024

@enuchi Iā€™m trying to debug the client side code ( the react code that is running in the sidebar )

Will try that solution tomorrow and update this case. Thanks!

from react-google-apps-script.

enuchi avatar enuchi commented on July 29, 2024

Ah, got it. So for now, keep it in production mode and add this to the client config:

optimization: {
    minimize: false,
},

Here:

const clientConfig = {
...sharedConfigSettings,
output: {
path: path.resolve(__dirname, destination),
},
resolve: {
extensions: ['.js', '.jsx', '.json'],
},
module: {
rules: [
// turned off by default, but uncomment below to run linting during build
// eslintConfig,
{
test: /\.jsx?$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
},
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader'],
},
],
},
};

from react-google-apps-script.

enuchi avatar enuchi commented on July 29, 2024

@mx2323 Updated the config so that development mode doesn't minify. There are new docs in the README that explain how to set up a development environment.

from react-google-apps-script.

enuchi avatar enuchi commented on July 29, 2024

Feel free to reopen this if you still have issues.

from react-google-apps-script.

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.