Skip to content

Commit 7b0a083

Browse files
committed
Fix source maps in published packages
I noticed this problem from this warning in my build: ``` Warning: ignoring input sourcemap for ../rewritten-packages/@embroider/synthesized-vendor/vendor/ember/ember-testing.js because ENOENT: no such file or directory, open '.../node_modules/.embroider/rewritten-packages/@embroider/synthesized-vendor/vendor/ember/ember-template-compiler.js.map' ``` Indeed, it seems like as of 5.10.0-beta.1, we stopped publishing source maps: https://unpkg.com/browse/[email protected]/dist/ ...despite having every intention to do so still. Last good version: https://unpkg.com/browse/[email protected]/dist/ It took me way to long to spot this, but the problem is in the extension; in the broccoli build, they had a `$name.map` filename, whereas in the new build (#20675) it's `$name.js.map`. Adjusted the entries in package.json to match; also removed the types publish script that was accidentally included in the tarball. * * * As for my original quest to fix the warning, it turns out this is not sufficient. The file is placed there by @embroider/compat these days: embroider-build/embroider#2164 It'll have to be updated to also emit the source map file (if it is present, since this has been broken for a while). But this is a prerequisite to fixing that.
1 parent 91467a6 commit 7b0a083

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

lib/index.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,19 @@ module.exports = {
130130

131131
let templateCompiler = new Funnel(tree, {
132132
destDir: 'ember',
133-
include: ['ember-template-compiler.js', 'ember-template-compiler.map'],
133+
include: ['ember-template-compiler.js', 'ember-template-compiler.js.map'],
134134
});
135135

136136
let which = isProduction ? 'prod' : 'debug';
137137

138138
let ember = new Funnel(tree, {
139139
destDir: 'ember',
140-
include: [`ember.${which}.js`, `ember.${which}.map`, 'ember-testing.js', 'ember-testing.map'],
140+
include: [
141+
`ember.${which}.js`,
142+
`ember.${which}.js.map`,
143+
'ember-testing.js',
144+
'ember-testing.js.map',
145+
],
141146
getDestinationPath(path) {
142147
return path.replace(`ember.${which}.`, 'ember.');
143148
},

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@
2525
"dist/packages",
2626
"dist/dependencies",
2727
"dist/ember-template-compiler.js",
28-
"dist/ember-template-compiler.map",
28+
"dist/ember-template-compiler.js.map",
2929
"dist/ember.debug.js",
30-
"dist/ember.debug.map",
30+
"dist/ember.debug.js.map",
3131
"dist/ember.prod.js",
32-
"dist/ember.prod.map",
32+
"dist/ember.prod.js.map",
3333
"dist/ember-testing.js",
34-
"dist/ember-testing.map",
34+
"dist/ember-testing.js.map",
3535
"docs/data.json",
3636
"lib",
37-
"types"
37+
"types/stable"
3838
],
3939
"repository": {
4040
"type": "git",
@@ -399,4 +399,4 @@
399399
"node": "16.20.0",
400400
"pnpm": "8.10.0"
401401
}
402-
}
402+
}

0 commit comments

Comments
 (0)