fix: styles and hot
This commit is contained in:
parent
c0486bf81f
commit
3e353b0bfc
|
@ -22,9 +22,12 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@neutrinojs/react": "^9.4.0",
|
"@neutrinojs/react": "^9.4.0",
|
||||||
"debug": "4.3.1",
|
"debug": "4.3.1",
|
||||||
|
"node-sass": "^5.0.0",
|
||||||
|
"postcss-loader": "3.0.0",
|
||||||
"react": "^17.0.1",
|
"react": "^17.0.1",
|
||||||
"react-dom": "^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": {
|
"devDependencies": {
|
||||||
"@neutrinojs/airbnb-base": "^9.4.0",
|
"@neutrinojs/airbnb-base": "^9.4.0",
|
||||||
|
|
|
@ -3,8 +3,32 @@ const react = require('@neutrinojs/react');
|
||||||
const middleware = (neutrino) => {
|
const middleware = (neutrino) => {
|
||||||
neutrino.use(react({
|
neutrino.use(react({
|
||||||
clean: false,
|
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.use((neutrino) => {
|
||||||
|
neutrino.config.resolve.modules
|
||||||
|
.add(`${neutrino.options.source}/react`);
|
||||||
|
neutrino.config.resolve.modules
|
||||||
|
.add(`${neutrino.options.source}/../node_modules`);
|
||||||
neutrino.config.optimization
|
neutrino.config.optimization
|
||||||
.runtimeChunk(false)
|
.runtimeChunk(false)
|
||||||
.splitChunks(false);
|
.splitChunks(false);
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user