mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-22 06:10:51 +01:00
Remove old craco file, rename dist directory
This commit is contained in:
parent
b54660a4b1
commit
3770f2d81a
@ -46,5 +46,5 @@ To build a production version of Nitro just run the following command
|
||||
yarn build:prod
|
||||
```
|
||||
|
||||
- A `build` folder will be generated, these are the files that must be uploaded to your webserver
|
||||
- A `dist` folder will be generated, these are the files that must be uploaded to your webserver
|
||||
- Consult your CMS documentation for compatibility with Nitro and how to add the production files
|
||||
|
@ -1,49 +0,0 @@
|
||||
module.exports = {
|
||||
eslint: {
|
||||
enable: false
|
||||
},
|
||||
webpack: {
|
||||
configure: (webpackConfig) => ({
|
||||
...webpackConfig,
|
||||
optimization: {
|
||||
...webpackConfig.optimization,
|
||||
splitChunks: {
|
||||
cacheGroups: {
|
||||
vendor: {
|
||||
name: 'vendors',
|
||||
test: /[\\/]node_modules[\\/]/,
|
||||
chunks: 'all',
|
||||
},
|
||||
renderer: {
|
||||
name: 'renderer',
|
||||
test: /[\\/]node_modules[\\/]@nitrots[\\/]nitro-renderer[\\/]/,
|
||||
chunks: 'all',
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
module: {
|
||||
...webpackConfig.module,
|
||||
rules: [
|
||||
{
|
||||
test: /\.mjs$/,
|
||||
include: /node_modules/,
|
||||
type: 'javascript/auto'
|
||||
},
|
||||
...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 };
|
||||
})
|
||||
};
|
||||
})
|
||||
]
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user