Jason Miller

Results 1189 comments of Jason Miller

@ScottPeterJohnson Sorry for the delayed reply. I think you're right that this is a timing issue, but I can't think of any way to defer WorkerPlugin's usage of `__webpack_public_path__` /...

@skmvasu what do you have `output.publicPath` set to in your Webpack configuration? Are you setting `__webpack_public_path__` to something at runtime?

Ah - I didn't realize this was a module you were distributing via npm. Honestly there's no consensus on Workers should be published to npm, I'm not sure this plugin...

@skmvasu just happened upon your reply here and wanted to point you at an npm module myself and Guy Bedford recently released that we hope may offer a fix for...

Hiya! This is actually a misconfiguration: `dist/` is not a valid webpack publicPath value, since it is a relative path - you can use `/dist/` instead: ``` output: { publicPath:...

`` is an HTML feature and does not apply within workers. Try adding this to the very top of your main worker file: ``` __webpack_public_path__ = '/dist/'; ```

Hi there! You need to set your `output.publicPath` to an absolute URL: ```diff { entry: ['./src/index.js'], output: { path: path.join(__dirname, 'dist'), filename: '[name].js', - publicPath: 'dist/' + publicPath: '/dist/' },...

@jamiewinder I'm not sure if it will work in the worker context, but you could set the public path dynamically at runtime (more info [here](https://github.com/webpack/webpack/issues/443)): ```js __webpack_public_path__ = location.pathname +...

Hi there - as you found in your research, DefinePlugin is broken in this way. This isn't an incorrect piece of documentation, it is simply a bug in Webpack's DefinePlugin....

This could probably be adapted (and simplified) to suit: https://gist.github.com/developit/65a2212731f6b00a8aaa55d70c594f5c FWIW, it's best to only invoke greenlet once per function - generally at definition time. Dynamically creating workers to do...