## 🤔 Expected Behavior
<!--- Tell us what should happen -->
It should build a js file.
## 😯 Current Behavior
<!--- Tell us what happens instead of the expected behavior -->
Instead of building js file, it gives me an error message.
<!--- If you are seeing an error, please include the full error message and stack trace -->
@parcel/transformer-js: Expected ',', got 'class'
## 💁 Possible Solution
<!--- Not obligatory, but suggest a fix/reason for the bug -->
## 🔦 Context
<!--- How has this issue affected you? What are you trying to accomplish? -->
I am trying to build JS files for production environment.
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
## 💻 Code Sample
<!-- Please provide a code repository, gist, code snippet or sample files to reproduce the issue -->
import m from "mithril";
import { SurveyForm } from "./components/form";
import { StepInfo } from "./components/preview";
import { State, Actions } from "./model";
🐛 bug report
🎛 Configuration (.babelrc, package.json, cli command)
.babelrc
file:./node_modules/.bin/parcel build --no-source-maps --dist-dir static/ --cache-dir ./spiritualblossom --public-url /static/ static_src/js/new-applicants/psychic/survey.js --no-cache
{ "devDependencies": { "@babel/core": "^7.25.2", "@babel/preset-env": "^7.25.4", "@parcel/transformer-less": "^2.12.0", "buffer": "^6.0.3", "parcel": "^2.12.0", "process": "^0.11.10", "typescript": "^5.6.3" }, }
import m from "mithril";
import { SurveyForm } from "./components/form"; import { StepInfo } from "./components/preview"; import { State, Actions } from "./model";
const SurveyView = (state, actions) => (
Survey
{gettext( "One of our interviewers will contact you soon to schedule a video interview. Please check your emails and follow the instructions." )}
);
export const Survey = (stepId) => { const state = State(stepId); const actions = Actions(state);
return { oninit: () => actions.fetchData(), view: () => (state.statusId === undefined ? null : SurveyView(state, actions)), }; };