Languages

Menu
Sites
Language
Get sourcemaps on Tizen TV

Hi,

I struggling with getting sourcemaps to show in my chromedev tools in a basic webapp running on my 2017 model U55MU7500 TV. I've tried every possible devtool setting in webpack and nothing is working. I'm still pretty new to Tizen TV webapp development but I thought I'd managed to get this working at one point. Has anyone else managed to get sourcemaps to show? Where might I be going wrong?

Here's my webpack.config.js

const webpack = require('webpack');
const CopyWebpackPlugin = require('copy-webpack-plugin');

module.exports = {
    devtool: "source-map",
    plugins: [
        new CopyWebpackPlugin([
                '.tproject',
                'config.xml',
                {from: 'src/*', ignore: [ '*.js' ], flatten: true}
            ])
    ]
}

and I've confirmed that the sourcemap file is indeed showing in the .wgt vefore getting pushed to the TV.

Edited by: Clifton Craig on 06 Aug, 2018

Responses

2 Replies
Clifton Craig

I think I just figured it out! Apparently you have to specify both the devtool and use the SourceMapDevToolPlugin. Here's my updated working webpack.config.js:

const webpack = require('webpack');
const CopyWebpackPlugin = require('copy-webpack-plugin');

module.exports = {
    devtool: "eval-source-map",
    plugins: [
        new CopyWebpackPlugin([
                '.tproject',
                'config.xml',
                {from: 'src/*', ignore: [ '*.js' ], flatten: true}
            ]),
        new webpack.SourceMapDevToolPlugin({
            module: true,
            filename: '[file].map',
            columns: false      })
    ]
};

I am surprised and confused as the documentation on webpack explicitly says not to use bot the devtool and plugin options in your config since it results in redundant plugin execution. Hey, I'm still learning!

Clifton Craig

I just learned that you don't need to use both the plugin and the devtool option. You only need to use one of the "eval" variants in the devtool option. I was confused because, in my testing, I was not cleaning my output directory. That meant each time I built and ran my app it was not changing the sourcemaps from the prior run so each of my attempts to update the devtool option was being ignored. Still learning...