Comments (4)
this is not an issue in dev mode and i added require('babel-core/register')({ presets: ['latest'] })
to the top of server-prod.js
from ghadyani-framework-old.
Hmm... That's strange. So you're saying if you add decorators to .babelrc
, it doesn't work properly for production builds, but it works for development.
You'll need to modify this to work with decorators: require('babel-core/register')({ presets: ['latest'] })
Like so:
require('babel-core/register')({
plugins: ['transform-decorators-legacy'],
presets: ['latest'],
})
Normally .babelrc
is used, but here, it's been customized because .babelrc
in this project is designed for client-side only. An even better fix is to make a server-side .babelrc-server
that gets required in for this config so it can be shared in both server-dev and server-prod.
from ghadyani-framework-old.
where is babelrc currently being imported for client side?
the part I don't understand is how it is working in dev mode. I don't see anything that would make babel use the babelrc in dev but not in production
the file this is crashing on is a client file btw
from ghadyani-framework-old.
fixed by adding: 'babel-loader?plugins[]=transform-decorators-legacy,presets[]=latest,presets[]=stage-0,presets[]=react'
to webpack.config.server.prod.js
from ghadyani-framework-old.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ghadyani-framework-old.