thinkjs / thinkjs/thinkjs

初始化项目,开启babel后,创建的初始化项目建议使用 import 和 export default 语法

Open
#1,436 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
5.3k
Forks
614
PR merge metrics
No merged PRs in 30d

Description

DESC

根据这个 https://github.com/thinkjs/thinkjs/issues/879

可以理解,但是在创建项目的时候,选择开启babel,但初始化出来的项目不是 import 和 export default 语法,这导致在使用上会出现混乱报错,虽然手工去改,可以解决问题,但不知道有没有初始化的时候,根据是否开启babel,来初始化不同的语法格式?

ENV

development
OS Platform: All
Node.js Version: v10

ThinkJS Version:3.x

code
// your code here
error message
// your error message here
more description

// your detail description

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named. Start by locating the project-initialization entry point and the templates selected by the Babel option; verify how generated syntax is chosen. Done means Babel-enabled projects use import and export default syntax consistently, while the existing non-Babel output remains appropriate.

Written by the indexing model from the issue text.

Assessment

Tech stack
babel, javascript, nodejs
Domain
build-system, cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.