UI가 material-ui에서 작동하는 데 문제가 있습니다. 나는 내 문제를 해결하기 위해 며칠 동안 인터넷과 stackoverflow를 검색 해왔다. 그러나 나는 모든 시도를 실패했다. 내가 사전에 신인Material UI and React
감사 부적합 공식 가이드를 찾을 수 있기 때문에 사람이, 내가 일이 점점 도울 수
편집 : 죄송 코드의 부족. 이걸 로컬로 작동 시키려면 npm start
을 실행해야한다는 것을 깨달았습니다. 그러나 이것은 다른 질문을 돌립니다. 어떻게 이것을 내 웹 서버에 배포합니까? 서버가 public_html 폴더에서 색인 파일을 찾고 있습니다. 웹팩이나 꿀꺽 꿀꺽 마심에 의존하기 때문에 이걸 내 서버에 어떻게 배치해야하는지 모르겠다. node.js를 실행해야합니까? 어떤
웹팩-production.config.js 후속 질문을 요청하십시오 :
const webpack = require('webpack');
const path = require('path');
const buildPath = path.resolve(__dirname, 'build');
const nodeModulesPath = path.resolve(__dirname, 'node_modules');
const TransferWebpackPlugin = require('transfer-webpack-plugin');
const config = {
entry: [path.join(__dirname, '/src/app/app.js')],
// Render source-map file for final build
devtool: 'source-map',
// output config
output: {
path: buildPath, // Path of output file
filename: 'app.js', // Name of output file
},
plugins: [
// Define production build to allow React to strip out unnecessary checks
new webpack.DefinePlugin({
'process.env':{
'NODE_ENV': JSON.stringify('production')
}
}),
// Minify the bundle
new webpack.optimize.UglifyJsPlugin({
compress: {
// suppresses warnings, usually from module minification
warnings: false,
},
}),
// Allows error warnings but does not stop compiling.
new webpack.NoErrorsPlugin(),
// Transfer Files
new TransferWebpackPlugin([
{from: 'www'},
], path.resolve(__dirname, 'src')),
],
module: {
loaders: [
{
test: /\.js$/, // All .js files
loaders: ['babel-loader'], // react-hot is like browser sync and babel loads jsx and es6-7
exclude: [nodeModulesPath],
},
],
},
};
module.exports = config;
도움을 요청하지만 문제를 설명하지 않은 경우 ... – olibiaz
무엇이 문제입니까? 오류를 발생시키는 코드와 원하는 것을 공유하십시오. –
답장을 보내 주셔서 감사합니다. 내 질문 업데이트 – frisk0