fix: styles and hot

This commit is contained in:
cha0s 2020-12-07 02:24:28 -06:00
parent c0486bf81f
commit 3e353b0bfc
3 changed files with 837 additions and 26 deletions

View File

@ -22,9 +22,12 @@
"dependencies": {
"@neutrinojs/react": "^9.4.0",
"debug": "4.3.1",
"node-sass": "^5.0.0",
"postcss-loader": "3.0.0",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-hot-loader": "^4.13.0"
"react-hot-loader": "^4.13.0",
"sass-loader": "^10.1.0"
},
"devDependencies": {
"@neutrinojs/airbnb-base": "^9.4.0",

View File

@ -3,8 +3,32 @@ const react = require('@neutrinojs/react');
const middleware = (neutrino) => {
neutrino.use(react({
clean: false,
hot: false,
style: {
test: /\.(css|sass|scss)$/,
modulesTest: /\.module\.(css|sass|scss)$/,
loaders: [
{
loader: 'postcss-loader',
useId: 'postcss',
options: {
config: {
path: process.cwd(),
},
},
},
{
loader: 'sass-loader',
useId: 'sass',
},
],
},
}));
neutrino.use((neutrino) => {
neutrino.config.resolve.modules
.add(`${neutrino.options.source}/react`);
neutrino.config.resolve.modules
.add(`${neutrino.options.source}/../node_modules`);
neutrino.config.optimization
.runtimeChunk(false)
.splitChunks(false);

File diff suppressed because it is too large Load Diff