mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-30 00:50:50 +01:00
More fixing
This commit is contained in:
parent
30e156a77b
commit
b52d7c41fc
@ -5,6 +5,36 @@ module.exports = {
|
||||
webpack: {
|
||||
configure: (webpackConfig) => ({
|
||||
...webpackConfig,
|
||||
module: {
|
||||
...webpackConfig.module,
|
||||
rules: [
|
||||
...webpackConfig.module.rules,
|
||||
// {
|
||||
// test: /\.(png|jpg|gif)$/i,
|
||||
// use: [
|
||||
// {
|
||||
// loader: 'url-loader',
|
||||
// options: {
|
||||
// limit: false,
|
||||
// },
|
||||
// } ,
|
||||
// ],
|
||||
// }
|
||||
].map(rule =>
|
||||
{
|
||||
if(!rule.oneOf) return rule;
|
||||
|
||||
return {
|
||||
...rule,
|
||||
oneOf: rule.oneOf.map((ruleObject) =>
|
||||
{
|
||||
if(!new RegExp(ruleObject.test).test('.ts') || !ruleObject.include) return ruleObject;
|
||||
|
||||
return { ...ruleObject, include: undefined };
|
||||
})
|
||||
};
|
||||
})
|
||||
},
|
||||
optimization: {
|
||||
...webpackConfig.optimization,
|
||||
splitChunks: {
|
||||
@ -21,23 +51,6 @@ module.exports = {
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
module: {
|
||||
...webpackConfig.module,
|
||||
rules: webpackConfig.module.rules.map((rule) =>
|
||||
{
|
||||
if(!rule.oneOf) return rule;
|
||||
|
||||
return {
|
||||
...rule,
|
||||
oneOf: rule.oneOf.map((ruleObject) =>
|
||||
{
|
||||
if(!new RegExp(ruleObject.test).test('.ts') || !ruleObject.include) return ruleObject;
|
||||
|
||||
return { ...ruleObject, include: undefined };
|
||||
})
|
||||
};
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -3,8 +3,8 @@
|
||||
"version": "2.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"start": "BROWSER=none craco start",
|
||||
"build": "GENERATE_SOURCEMAP=false craco build",
|
||||
"start": "cross-env BROWSER=none craco start",
|
||||
"build": "cross-env GENERATE_SOURCEMAP=false craco build",
|
||||
"build:prod": "npx browserslist@latest --update-db && yarn build",
|
||||
"test": "craco test",
|
||||
"eject": "react-scripts eject"
|
||||
@ -17,6 +17,7 @@
|
||||
"@nitrots/nitro-renderer": "^1.1.6",
|
||||
"animate.css": "^4.1.1",
|
||||
"classnames": "^2.3.1",
|
||||
"cross-env": "^7.0.3",
|
||||
"node-sass": "^6.0.1",
|
||||
"react": "^17.0.2",
|
||||
"react-bootstrap": "^2.0.0-alpha.2",
|
||||
|
@ -7,7 +7,7 @@
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="%PUBLIC_URL%/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="%PUBLIC_URL%/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="%PUBLIC_URL%/favicon-16x16.png">
|
||||
<link rel="manifest" href="%PUBLIC_URL%/site.webmanifest">
|
||||
<link rel="manifest" crossorigin="use-credentials" href="%PUBLIC_URL%/site.webmanifest">
|
||||
<link rel="mask-icon" href="%PUBLIC_URL%/safari-pinned-tab.svg" color="#000000">
|
||||
<meta name="apple-mobile-web-app-title" content="Nitro">
|
||||
<meta name="application-name" content="Nitro">
|
||||
|
@ -1,4 +1,5 @@
|
||||
{
|
||||
"start_url": "/",
|
||||
"name": "Nitro",
|
||||
"short_name": "Nitro",
|
||||
"icons": [
|
||||
|
Loading…
Reference in New Issue
Block a user