я создаю приложение response для tizen ( samsung TV ), когда я выполняю 'npm run build', я получаю сообщение об ошибке «tizen is undefined» и из-за этого Я не могу создать приложение для производства и запустить его в tizen studio
Я добавил webapck.config. js, как сказано в этой ссылке: webpack , но безуспешно
мой webpack.config. js файл:
const webpack = require('webpack');
const path = require('path');
const HtmlWebPackPlugin = require("html-webpack-plugin");
const htmlPlugin = new HtmlWebPackPlugin({
template: "./public/index.html",
filename: "./index.html"
});
module.exports = {
entry: "./src/index.js",
mode: 'development',
devtool: 'cheap-module-eval-source-map',
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: [
{
loader: 'babel-loader',
options: {
},
}
]
},
{
test: /\.(png|jpe?g|gif|ttf|mp4|svg)$/,
use: [
{
loader: 'file-loader',
options: {},
},
],
},
{
test: /\.(scss|sass|css)$/,
use: [
"style-loader", // creates style nodes from JS strings
"css-loader", // translates CSS into CommonJS
"sass-loader" // compiles Sass to CSS, using Node Sass by default
]
}
]
},
optimization: {
},
resolve: {
extensions: ['*', '.js', '.jsx']
},
output: {
path: __dirname + '/dist',
publicPath: 'dist/',
filename: 'bundle.js',
sourceMapFilename: 'bundle.map'
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
htmlPlugin
],
devServer: {
contentBase: './dist',
hot: true
}
};
мой пакет. json:
{
"name": "portal-games",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.5.0",
"@testing-library/user-event": "^7.2.1",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-scripts": "3.4.1"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"dist": "webpack"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"babel-core": "^6.26.3",
"babel-loader": "^8.1.0",
"babel-preset-es2015": "^6.24.1",
"css-loader": "^3.6.0",
"file-loader": "^6.0.0",
"html-webpack-plugin": "^4.3.0",
"sass-loader": "^8.0.2",
"style-loader": "^1.2.1",
"webpack-cli": "^3.3.11"
}
}