Skip to content

Commit

Permalink
Revert unrelated changes
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinhagemeister committed Sep 1, 2021
1 parent 9310619 commit 039ed30
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
1 change: 0 additions & 1 deletion packages/wmr/src/lib/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ export function getPlugins(options) {
}),
// Nested workers are not supported at the moment
!isWorker && workerPlugin(options),
//!isWorker && workerPlugin(options),
htmPlugin({ production, sourcemap: options.sourcemap }),
!isWorker && wmrPlugin({ hot: !production, sourcemap: options.sourcemap }),
fastCjsPlugin({
Expand Down
4 changes: 2 additions & 2 deletions packages/wmr/src/lib/rollup-plugin-container.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,10 @@ export function createPluginContainer(plugins, opts = {}) {
},

/** @param {string} property */
resolveImportMeta(property, id) {
resolveImportMeta(property) {
for (plugin of plugins) {
if (!plugin.resolveImportMeta) continue;
const result = plugin.resolveImportMeta.call(ctx, property, { moduleId: id });
const result = plugin.resolveImportMeta.call(ctx, property);
if (result) return result;
}

Expand Down
3 changes: 1 addition & 2 deletions packages/wmr/src/plugins/worker-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,7 @@ export function workerPlugin(options) {
code: s.toString(),
map: options.sourcemap
? s.generateMap({ source: id, file: path.posix.basename(id), includeContent: true })
: null,
meta: { worker: { moduleWorkers: ['foo'] } }
: null
};
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/wmr/src/wmr-middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ export const TRANSFORMS = {

const rewritten = await transformImports(code, id, {
resolveImportMeta(property) {
return NonRollup.resolveImportMeta(property, id);
return NonRollup.resolveImportMeta(property);
},
async resolveId(spec, importer) {
if (spec === 'wmr') return '/_wmr.js';
Expand Down

0 comments on commit 039ed30

Please sign in to comment.