This repository was archived by the owner on Jan 31, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +12
-7
lines changed Expand file tree Collapse file tree 6 files changed +12
-7
lines changed Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
- // require('../scss/language.scss');
3
+ require ( '../scss/language.scss' ) ;
4
4
require ( './simple.css' ) ;
5
5
6
6
setInterval ( function ( ) {
7
- document . body . innerHTML += '<br>this text should not suddenly disappear because the style is replaced on- the-fly ' ;
7
+ document . body . innerHTML += '<br>Now we just change the DOM, so that we can ensure that webpack is not just reloading the page ' ;
8
8
} , 2000 ) ;
Original file line number Diff line number Diff line change 6
6
< script async src ="/bundle.hmr.js "> </ script >
7
7
</ head >
8
8
< body >
9
- < h1 class ="another-module box "> Now go change some files, dude!</ h1 >
9
+ < h1 class ="another-scss- module box "> Now go change some files, dude!</ h1 >
10
10
</ body >
11
11
</ html >
Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ module.exports = {
24
24
]
25
25
} ,
26
26
debug : true ,
27
- devtool : 'eval' ,
28
27
watch : true ,
29
28
plugins : [
30
29
new webpack . HotModuleReplacementPlugin ( )
Original file line number Diff line number Diff line change 6
6
< link href ="/styles.sourcemap.css " type ="text/css " rel ="stylesheet ">
7
7
</ head >
8
8
< body >
9
- < h1 class ="another-module box "> Open the developer tools, dude!</ h1 >
9
+ < h1 class ="another-scss- module box "> Open the developer tools, dude!</ h1 >
10
10
</ body >
11
11
</ html >
Original file line number Diff line number Diff line change
1
+ 'use strict' ;
2
+
3
+ require ( '../scss/imports.scss' ) ;
Original file line number Diff line number Diff line change @@ -5,7 +5,10 @@ var path = require('path');
5
5
var pathToSassLoader = path . resolve ( __dirname , '../../index.js' ) ;
6
6
7
7
module . exports = {
8
- entry : path . resolve ( __dirname , '../sourceMap/entry.js' ) ,
8
+ entry : [
9
+ path . resolve ( __dirname , '../scss/imports.scss' ) ,
10
+ path . resolve ( __dirname , '../scss/import-include-paths.scss' )
11
+ ] ,
9
12
output : {
10
13
path : path . resolve ( __dirname , '../output' ) ,
11
14
filename : 'bundle.watch.js'
@@ -15,7 +18,7 @@ module.exports = {
15
18
loaders : [
16
19
{
17
20
test : / \. s c s s $ / ,
18
- loader : 'css-loader!' + pathToSassLoader
21
+ loader : 'css-loader!' + pathToSassLoader + '?includePaths[]=' + encodeURIComponent ( path . resolve ( __dirname , '../scss/from-include-path' ) )
19
22
}
20
23
]
21
24
}
You can’t perform that action at this time.
0 commit comments