make global packages be accessible to the optimized bundle
See original GitHub issueHi,
I am using sequelize and it is required that I do
npm install mysql2 --save
before the code works.
i tried this config
custom:
optimize:
debug: true
minify: true
plugins: ['transform-object-rest-spread']
includePaths: ['.env.example']
external: ['mysql2']
but i still get this error
You need to install mysql2 package manually
i can see the node_modules
folder on the zip file but i suspect it’s placed on the wrong folder?
i also tried
require('mysql2');
on my handler but it failed, i think it wasn’t able to get the dependencies of mysql2
What could I possibly do to overcome this issue using this plugin? Will appreciate any help. Thanks!
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Slimming down your bundle size - LogRocket Blog
This strategy for bundle optimization and slimming down total bundle size is easy and straightforward. Webpack has a production flag ( -p )...
Read more >GitHub - AnomalyInnovations/serverless-bundle
Optimized packages for ES6 and TypeScript Node.js Lambda functions without any configuration. - GitHub - AnomalyInnovations/serverless-bundle: Optimized ...
Read more >Bundling and Minification | Microsoft Learn
Bundling is a new feature in ASP.NET 4.5 that makes it easy to combine or bundle multiple files into a single file. You...
Read more >How to add reference to System.Web.Optimization for MVC-3 ...
I'm trying to use the new bundling feature in a project I recently converted from MVC 3 to MVC 4 beta. It requires...
Read more >bundle install - Bundler
Makes a bundle that can work without depending on Rubygems or Bundler at runtime. A space separated list of groups to install has...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thank you. I’ll check that out.
@selected-pixel-jameson @shierro I had the same issue as you both and solved it by doing the following:
npm install --save mysql2