mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2025-01-03 01:16:14 +03:00
Suppress elm --optimize warnings.
This commit is contained in:
parent
c0e7ccd3ab
commit
740f334958
@ -8,6 +8,8 @@ function runElm(callback) {
|
||||
process.chdir(elmBaseDirectory);
|
||||
compileToString([mainElmFile], {}).then(function(data) {
|
||||
(function() {
|
||||
const warnOriginal = console.warn;
|
||||
console.warn = function() {};
|
||||
eval(data.toString());
|
||||
const app = Elm.Main.init({ flags: { imageAssets: {} } });
|
||||
|
||||
@ -15,6 +17,7 @@ function runElm(callback) {
|
||||
process.chdir(startingDir);
|
||||
callback(payload);
|
||||
delete Elm;
|
||||
console.warn = warnOriginal;
|
||||
});
|
||||
})();
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user