-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Deanonymize worker factory function There is a known caveat with workerify-webpack which can result in errors in some webpack environments; the worker function passed to workerify should not be anonymous. This one-line change names the function 'MapboxGlWorker' and resolves the issue. * Improve webpack example configuration docs Adds a note about avoiding 'eval'-related devtool settings in webpack configurations, which can result in errors with workerify-webpack. * Add webpack build test * Rename MapboxGlWorker to createWorker * Further clarify webworkify-webpack caveats
- Loading branch information
Showing
5 changed files
with
42 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
'use strict'; | ||
|
||
var webpack = require("webpack"); | ||
var test = require('tap').test; | ||
var MemoryFS = require('memory-fs'); | ||
var util = require('../../js/util/util'); | ||
|
||
test('builds with webpack', function(t) { | ||
|
||
var compiler = webpack(util.extend(require('../../webpack.config.example'), { | ||
entry: './js/mapbox-gl.js', | ||
output: { | ||
path: '/', | ||
filename: 'webpack.js' | ||
} | ||
})); | ||
|
||
compiler.outputFileSystem = new MemoryFS(); | ||
compiler.run(function(error, stats) { | ||
t.error(error); | ||
t.notOk(stats.hasErrors()); | ||
t.notOk(stats.hasWarnings()); | ||
t.ok(compiler.outputFileSystem.readFileSync('/webpack.js').toString()); | ||
t.end(); | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters