You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working on a node application using serverless architecture. We are using serverless-webpack plugin to build the application. Here is the webpack.config.js :
module.exports={mode: isLocal ? 'development' : 'production',entry: slsw.lib.entries,externals: [nodeExternals()],devtool: 'inline-cheap-module-source-map',resolve: {extensions: ['.js','.jsx','.json','.ts','.tsx']},output: {libraryTarget: 'commonjs2',path: path.join(__dirname,'.webpack'),filename: '[name].js'},optimization: {minimize: true,minimizer: [newTerserPlugin()],},target: 'node',module: {rules: [{test: /\.ts$/,exclude: /node_modules/,loader: 'ts-loader',options: {// disable type checker - we will use it in fork plugintranspileOnly: true}},{test: /\.(graphql|gql)$/,exclude: /node_modules/,loader: 'graphql-tag/loader',}]},// plugins: [new ForkTsCheckerWebpackPlugin()]};
When I am running sls deploy --config serverless.yml to deploy the application , everything is working and the lambda is getting deployed successfully. Only thing is , during the process of deployment , it is using the package-lock.json and installing the used packages again :
Serverless: Package lock found - Using locked versions
Serverless: Packing external modules: graphql-compose@^7.19.3, linewrap@^0.2.1, d64@^1.0.0, graphql-scalars@^1.2.6, graphql-tools@^6.0.12
Serverless: Packaging service...
My question is how to stop rerunning the npm install again during deployment instead it should use the existing node_moudles while packing the external modules. Can anybody help me on this. ?
The text was updated successfully, but these errors were encountered:
I am working on a node application using serverless architecture. We are using serverless-webpack plugin to build the application. Here is the webpack.config.js :
and serverless.yml file. :
When I am running sls deploy --config serverless.yml to deploy the application , everything is working and the lambda is getting deployed successfully. Only thing is , during the process of deployment , it is using the package-lock.json and installing the used packages again :
My question is how to stop rerunning the npm install again during deployment instead it should use the existing node_moudles while packing the external modules. Can anybody help me on this. ?
The text was updated successfully, but these errors were encountered: