-
-
Notifications
You must be signed in to change notification settings - Fork 200
Source Maps Failing in Dev #352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
More context based on what @raupie put on Slack:
// (...)
}]);
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ(...)ZVJvb3QiOiIifQ==(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["_tmp_shared"],{
"../../../tmp/tmp-92SW7NIosJEwEF.tmp":
(function(module, exports, __webpack_require__) {
__webpack_require__( "./assets/js/global.js")
})
// (...) It seems that a line-break is missing before @raupie Do you have any additional info that could help reproducing the issue? For instance the content of your |
webpack.config.js
global.js
prod-page.js
Trying to use foundation + datatables. Compile is now failing with |
I did a quick check and could reproduce it with the following config and an empty // webpack.config.js
const Encore = require('@symfony/webpack-encore');
Encore
.disableSingleRuntimeChunk() // Doesn't seem to matter
.setOutputPath('build')
.setPublicPath('/build')
.cleanupOutputBeforeBuild()
.enableSourceMaps(!Encore.isProduction())
.createSharedEntry('shared', './shared.js')
;
module.exports = Encore.getWebpackConfig(); Extract from the final //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJ(...)2VSb290IjoiIn0=/******/ (function(modules) { // webpackBootstrap |
This PR was merged into the master branch. Discussion ---------- Fix shared entry file when source maps are enabled This PR fixes #352. When source maps are enabled, the original shared entry file ends with a commented line. This is an issue when the "_tmp_shared" entry is appended to it since its first line then becomes part of that comment. Commits ------- 278d992 Fix shared entry file when source maps are enabled
When using
.enableSourceMaps(!Encore.isProduction())
I am getting aUncaught SyntaxError: Unexpected token :
error.When I set source maps to false, it goes away.
Missing break line?
The text was updated successfully, but these errors were encountered: