Skip to content

Commit

Permalink
enable sourcemaps with typescript support
Browse files Browse the repository at this point in the history
  • Loading branch information
nightire committed Dec 25, 2020
1 parent 14df958 commit af326f6
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 15 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"devDependencies": {
"@babel/plugin-proposal-class-properties": "^7.12.1",
"@babel/plugin-proposal-decorators": "^7.12.12",
"@glimmer/babel-plugin-glimmer-env": "^2.0.0-beta.1",
"@glimmerx/babel-plugin-component-templates": "^0.3.0",
"@glimmerx/component": "^0.3.0",
"@glimmerx/core": "^0.3.0",
Expand Down
6 changes: 1 addition & 5 deletions snowpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ module.exports = {
buildOptions: {
// 构建输出到 `dist` 目录
out: "dist",
sourceMaps: true,
},
devOptions: {
port: 4000,
},
// 这是一个隐性依赖,项目并不会安装 @glimmer/core 而是安装 @glimmerx/core,但
// 运行时会报错,所以我们让 snowpack 负责安装这个依赖
install: ["@glimmer/core"],
// installOptions: {},
mount: {
// `public` 目录映射到应用程序根路径
public: "/",
Expand All @@ -27,10 +27,6 @@ module.exports = {
input: [".js", ".jsx", ".mjs", ".ts", ".tsx"],
transformOptions: {
plugins: [
[
"@glimmer/babel-plugin-glimmer-env",
{ DEBUG: process.env.NODE_ENV === "development" },
],
"@glimmerx/babel-plugin-component-templates",
["@babel/plugin-proposal-decorators", { legacy: true }],
"@babel/plugin-proposal-class-properties",
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { renderComponent } from "@glimmerx/core";
import Application from "./APP";
import Application from "./application";

const rootElement = document.querySelector(".glimmer-application");

Expand Down
8 changes: 0 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -877,14 +877,6 @@
resolved "https://registry.yarnpkg.com/@ember-data/rfc395-data/-/rfc395-data-0.0.4.tgz#ecb86efdf5d7733a76ff14ea651a1b0ed1f8a843"
integrity sha512-tGRdvgC9/QMQSuSuJV45xoyhI0Pzjm7A9o/MVVA3HakXIImJbbzx/k/6dO9CUEQXIyS2y0fW6C1XaYOG7rY0FQ==

"@glimmer/babel-plugin-glimmer-env@^2.0.0-beta.1":
version "2.0.0-beta.1"
resolved "https://registry.yarnpkg.com/@glimmer/babel-plugin-glimmer-env/-/babel-plugin-glimmer-env-2.0.0-beta.1.tgz#3ef1052441010394dcab7394a43110fc4cc29a80"
integrity sha512-R7hsEHlxcgoxs8ZY81bh3u7aIL3bFxjXAV31Kx9FaTDhpTnT47OTBEaVAjl4efehAbGCFPeBKY14RdNF18+g0Q==
dependencies:
"@babel/core" "^7.5.5"
babel-plugin-debug-macros "^0.3.3"

"@glimmer/[email protected]":
version "2.0.0-beta.11"
resolved "https://registry.yarnpkg.com/@glimmer/babel-plugin-strict-template-precompile/-/babel-plugin-strict-template-precompile-2.0.0-beta.11.tgz#73b172c138f257a42d16f38d7b1dfd052050235f"
Expand Down

0 comments on commit af326f6

Please sign in to comment.