Skip to content

Commit 4f37cf9

Browse files
szyablitskyjustin808
authored andcommitted
hot reloading fix (shakacode#373)
* hot reloading fix * revert back yarn.lock and database.yml * revert back yarn.lock
1 parent 001a3ae commit 4f37cf9

3 files changed

+2
-19
lines changed

Diff for: client/webpack.client.base.config.js

-13
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
// Common client-side webpack configuration used by webpack.hot.config and webpack.rails.config.
55
const webpack = require('webpack');
66
const path = require('path');
7-
const autoprefixer = require('autoprefixer');
87

98
const devBuild = process.env.NODE_ENV !== 'production';
109
const nodeEnv = devBuild ? 'development' : 'production';
@@ -77,18 +76,6 @@ module.exports = {
7776
minChunks: Infinity,
7877

7978
}),
80-
81-
new webpack.LoaderOptionsPlugin({
82-
options: {
83-
// Place here all postCSS plugins here, so postcss-loader will apply them
84-
postcss: [autoprefixer],
85-
// Place here all SASS files with variables, mixins etc.
86-
// And sass-resources-loader will load them in every CSS Module (SASS file) for you
87-
// (so don't need to @import them explicitly)
88-
// https://github.com/shakacode/sass-resources-loader
89-
sassResources: ['./app/assets/styles/app-variables.scss']
90-
}
91-
})
9279
],
9380

9481
module: {

Diff for: client/webpack.client.rails.hot.config.js

+2
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ config.module.rules.push(
5656
{
5757
test: /\.css$/,
5858
use: [
59+
'style-loader',
5960
{
6061
loader: 'css-loader',
6162
options: {
@@ -75,6 +76,7 @@ config.module.rules.push(
7576
{
7677
test: /\.scss$/,
7778
use: [
79+
'style-loader',
7880
{
7981
loader: 'css-loader',
8082
options: {

Diff for: client/webpack.server.rails.build.config.js

-6
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@ module.exports = {
3232
'process.env': {
3333
NODE_ENV: JSON.stringify(nodeEnv),
3434
},
35-
}),
36-
new webpack.LoaderOptionsPlugin({
37-
options: {
38-
sassResources: ['./app/assets/styles/app-variables.scss'],
39-
}
4035
})
4136
],
4237
module: {
@@ -75,7 +70,6 @@ module.exports = {
7570
loader: 'sass-resources-loader',
7671
options: {
7772
resources: './app/assets/styles/app-variables.scss',
78-
context: __dirname,
7973
},
8074
}
8175
],

0 commit comments

Comments
 (0)