Using babelInclude("node_modules/shared-lib") doesn't seem to work
See original GitHub issueIn my shared-lib, I have a file that uses class properties that should be compiled by babel like the example below:
class Shared-utils {
someProp = () => {
//do stuff
}
export default Shared-utils
When I run npm start in my main project I get the following error:
SyntaxError: path-to-shared-lib/Shared-utiles.js: Support for the experimental syntax 'classProperties' isn't currently enabled (8:9):
...
Add @babel/plugin-proposal-class-properties (https://git.io/vb4SL) to the 'plugins' section of your Babel config to enable transformation.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8
Top Results From Across the Web
Include some node_modules directories in Babel 7
I finally got this to work. package.json { "name": "someproject", "version": "1.0.0", "description": "", "main": "index.js", "browserslist": "> 0.25% in DE, ...
Read more >Things I wish I had known when I started JavaScript monorepo ...
Monorepo must have a mechanism how to interconnect packages and allow us to use one package code within another. Dependency management.
Read more >Three Ways to Share Node.js Modules Across Multiple Projects
Option 1: Link to a Local Project Folder ... Once you've moved your shared code into a separate project, link the project as...
Read more >Why and how to transpile dependencies of your JavaScript ...
CommonJS variant that doesn't use modern features of JavaScript such ... usage examples for Babel and babel-loader to exclude node_modules ...
Read more >Babel doesn't see shared lib - Serverless Forums
Hello, my project is structured: ~/myproj |- node_modules |- lib |- shared.js |- service1 | - serverless.yml | - webpack.config.js ...
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
Hey, I figured it out… You can use
fs.realpathSync("../../node_modules/@project/comp-one")
instead ofpath.resolve("../../node_modules/@project/comp-one")
It solved my problem.
Yes, its because its a seemlink! Any suggestions?