Remove old craco file, rename dist directory

This commit is contained in:
Bill 2023-01-03 02:49:39 -05:00
parent b54660a4b1
commit 3770f2d81a
2 changed files with 1 additions and 50 deletions

View File

@ -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

View File

@ -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 };
})
};
})
]
}
})
}
}