Я был под Neutrino 8 и теперь пытаюсь перейти на Neutrino 9.
Мне удалось решить все проблемы, кроме предупреждения
WARNING in Conflict: Multiple assets emit different content to the same filename assets/ad.svg
WARNING in Conflict: Multiple assets emit different content to the same filename assets/af.svg
WARNING in Conflict: Multiple assets emit different content to the same filename assets/ai.svg .....
Вот мой .neutrinor c. js config:
const eslint = require('@neutrinojs/eslint');
const react = require('@neutrinojs/react');
const jest = require('@neutrinojs/jest');
// Use with default options
//const fs = require('fs');
//const os = require('os');
// Use with default options
module.exports = {
options: {
mains: {
index: 'index', // outputs index.html from src/index.js
app: 'app', // outputs app.html from src/app.js
help: 'help' // outputs help.html from src/help.js
},
output: 'dist'
},
use: [
eslint({
eslint: {
useEslintrc: false
}
}),
react({
html: {
title: 'gui',
favicon: 'src/static/favicon.ico'
},
devServer: {
public: 'localhost',
host: 'localhost',
clientLogLevel: 'info',
https: false,
port: 7272,
disableHostCheck: true,
},
targets: {
browsers: [
'last 2 Chrome versions',
'last 2 Firefox versions',
'last 2 Edge versions',
'last 2 Opera versions',
'last 2 Safari versions',
'last 2 iOS versions'
],
},
style:
{
loaders: [{
loader: 'sass-loader',
useId: 'sass',
options: {
includePaths: ['./node_modules/']
}
}],
test: /\.(css|sass|scss)$/,
moduleTest: /\.module\.(css|sass|scss)$/
}
}),
jest()
]
};
И мой webpack.config. js
const neutrino = require('neutrino');
module.exports = neutrino().webpack();
Наконец-то мой пакет. json
{
"name": "react-bootstrap-gui",
"version": "0.1.0",
"private": true,
"dependencies": {
"@material/linear-progress": "^1.1.0",
"@material/react-linear-progress": "^0.13.0",
"@mdi/font": "^3.6.95",
"@sweetalert/with-react": "^0.1.1",
"animate.css": "^3.7.2",
"axios": "^0.18.0",
"bootstrap": "^4.3.1",
"flag-icon-css": "^3.3.0",
"material-design-icons": "^3.0.1",
"moment": "^2.24.0",
"prop-types": "^15.7.2",
"qs": "^6.7.0",
"react": "^16.8.6",
"react-bootstrap": "^1.0.0-beta.8",
"react-bootstrap-typeahead": "^4.0.0-alpha.10",
"react-dom": "^16.8.6",
"react-hot-loader": "^3.1.3",
"react-router-dom": "^5.0.0",
"react-select": "^2.4.3",
"react-useragent": "^1.1.2",
"sweetalert": "^2.1.2",
"sweetalert2": "^8.19.0",
"sweetalert2-react-content": "^2.0.2"
},
"scripts": {
"build": "webpack",
"start": "webpack-dev-server --mode development --open",
"lint": "eslint --cache --format codeframe --ext mjs,jsx,js src",
"test": "jest"
},
"devDependencies": {
"@neutrinojs/jest": "^9.1.0",
"@neutrinojs/react": "^9.1.0",
"@neutrinojs/standardjs": "^9.1.0",
"babel-eslint": "^10.1.0",
"eslint": "^6.8.0",
"eslint-config-react-app": "^5.2.1",
"eslint-plugin-flowtype": "^4.7.0",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-react": "^7.19.0",
"eslint-plugin-react-hooks": "^3.0.0",
"jest": "^25.3.0",
"neutrino": "^9.1.0",
"node-sass": "^4.13.1",
"sass-loader": "^7.1.0",
"strip-ansi": "^3.0.1",
"webpack": "^4.42.1",
"webpack-cli": "^3.3.11",
"webpack-dev-server": "^3.10.3"
}
}
Neutrino default config, кажется, добавляет [name]. [ext], что является способом исправить это в большинстве статей. название: isProduction? 'assets / [name]. [ha sh: 8]. [ext]': 'assets / [name]. [ext]'
С наилучшими пожеланиями