diff --git a/.changeset/grumpy-points-report.md b/.changeset/grumpy-points-report.md new file mode 100644 index 000000000..a95b6bdcb --- /dev/null +++ b/.changeset/grumpy-points-report.md @@ -0,0 +1,6 @@ +--- +'modular-scripts': minor +--- + +Output file structure equivalent to webpack for esbuild files +`/static/(js|css)/*`. diff --git a/.changeset/nervous-pianos-live.md b/.changeset/nervous-pianos-live.md new file mode 100644 index 000000000..ce0ec5945 --- /dev/null +++ b/.changeset/nervous-pianos-live.md @@ -0,0 +1,6 @@ +--- +'modular-scripts': patch +--- + +Reduced number of plugin passes required to generate SVGs using SVGR in esbuild +output. diff --git a/.changeset/orange-bulldogs-beg.md b/.changeset/orange-bulldogs-beg.md new file mode 100644 index 000000000..4c5593692 --- /dev/null +++ b/.changeset/orange-bulldogs-beg.md @@ -0,0 +1,6 @@ +--- +'modular-scripts': patch +--- + +Write files in memory when running an esbuild server to fix issues with file +paths outside of the modular root. diff --git a/.changeset/shiny-glasses-glow.md b/.changeset/shiny-glasses-glow.md new file mode 100644 index 000000000..0b3299bf9 --- /dev/null +++ b/.changeset/shiny-glasses-glow.md @@ -0,0 +1,6 @@ +--- +'modular-scripts': minor +--- + +Improve source map asset paths to be relative to the modular root instead of +application root. diff --git a/package.json b/package.json index c40f5d2a3..ba0e760af 100644 --- a/package.json +++ b/package.json @@ -59,6 +59,7 @@ "@types/global-modules": "^2.0.0", "@types/is-ci": "3.0.0", "@types/jest": "26.0.24", + "@types/mime": "^2.0.3", "@types/node": "*", "@types/npm-packlist": "1.1.2", "@types/parse5": "^6.0.3", @@ -83,7 +84,7 @@ "micromatch": "4.0.4", "patch-package": "^6.4.7", "pptr-testing-library": "0.6.5", - "prettier": "2.5.0", + "prettier": "2.4.0", "puppeteer": "12.0.1", "react": "17.0.2", "react-dom": "17.0.2", diff --git a/packages/modular-scripts/package.json b/packages/modular-scripts/package.json index c561121ae..64ab2a9e5 100644 --- a/packages/modular-scripts/package.json +++ b/packages/modular-scripts/package.json @@ -78,6 +78,7 @@ "jest-watch-typeahead": "0.6.5", "loader-utils": "2.0.0", "micromatch": "4.0.4", + "mime": "^3.0.0", "mini-css-extract-plugin": "0.11.3", "npm-packlist": "3.0.0", "open": "8.3.0", @@ -121,9 +122,9 @@ "ws": "7.4.6" }, "peerDependencies": { - "typescript": "^4.3.5", "react": "^16 || ^17", - "react-dom": "^16 || ^17" + "react-dom": "^16 || ^17", + "typescript": "^4.3.5" }, "files": [ "dist-cjs", diff --git a/packages/modular-scripts/src/__tests__/__snapshots__/app.esbuild.test.ts.snap b/packages/modular-scripts/src/__tests__/__snapshots__/app.esbuild.test.ts.snap index 8c50489a3..997b13acc 100644 --- a/packages/modular-scripts/src/__tests__/__snapshots__/app.esbuild.test.ts.snap +++ b/packages/modular-scripts/src/__tests__/__snapshots__/app.esbuild.test.ts.snap @@ -6,8 +6,8 @@ Object { "names": Array [], "sourceRoot": "//modular", "sources": Array [ - "../../packages/sample-esbuild-app/src/App.css", - "../../packages/sample-esbuild-app/src/index.css", + "../../../../packages/sample-esbuild-app/src/App.css", + "../../../../packages/sample-esbuild-app/src/index.css", ], "sourcesContent": Array [ ".App { @@ -83,12 +83,12 @@ exports[`when working with an app can generate a index.html 1`] = `