Comments (4)
(Note: Substitute with yarn equivalents)
On the command line in npm initialized project:
npm install --save-dev babel-preset-env
touch .babelrc
In .babelrc:
{
"presets": [
"env"
]
}
In package.json:
{
...
"scripts": {
"start": "parcel ./index.html"
},
...
}
On the command line:
npm start
Then npm takes the .babelrc file into account.
from parcel.
I solved the problem by adding babel-preset-env
.
I put it available with this setting and hot-reload at https://github.com/davidsonsns/parcel-react-app.
from parcel.
Ah I see. It's because the .babelrc
in parcel is being published to npm, so parcel is trying to compile its own code for the small JS runtime that is included alongside CSS to do hot reloading. Then babel tries to find preset-env which is specified in there, even though we don't really need it.
Added .babelrc
to .npmignore
in 30616e9.
from parcel.
Should be fixed in v1.0.2.
from parcel.
Related Issues (20)
- @parcel/register throws error `parcel[_core(...).INTERNAL_RESOLVE] is not a function`
- Parcel build fails on Chrome < 86 due to dynamic import and chunking issues HOT 1
- Unable to make `typeof process !== 'undefined'` false
- Parcel Macro in the REPL HOT 1
- segfault on parcel >= 2.10.0
- `parcel/config-webextension` can build extensions incompatible with Firefox's Add-Ons Store HOT 1
- Type-introspection with macros
- Vue 3 defineProps fail with imported types
- TypeScript syntax does not work in Vue templates
- I can't modified the HTML, cause every single time parcel brokes HOT 2
- Parcel build/watch silently fails HOT 1
- @parcel/transformer-css: Unexpected token Semicolon HOT 2
- Default Cache folder location is on root instead of workspace folder HOT 2
- Creating dynamic aliases. HOT 11
- https://github.com/parcel-bundler/parcel/commit/05604990d7531e5bd348abbc435b3dc5d49ad7fd breaks Typescript compilation HOT 1
- Parcel encountered error HOT 3
- There is typescript error in production build.
- parcel start works but not parcel build HOT 2
- Parcel build fails consistently with 10:SIGBUS and SIGSEGV
- Parcel fetching configs from where it's installed instead of where the process is running
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 parcel.