Skip to content

Commit 4bffefa

Browse files
authored
Merge pull request #46 from skuadron45/master
FIX: Live reload and PostCSS
2 parents dc6eccc + 88a6926 commit 4bffefa

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

build/webpack.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ const utils = require('./utils')
2020
module.exports = env => {
2121

2222
return {
23+
target: 'web',
24+
2325
context: path.join(__dirname, '../src'),
2426
entry: {
2527
app: path.join(__dirname, '../src/app.js'),
@@ -165,7 +167,7 @@ module.exports = env => {
165167
minify: !env === 'development',
166168
filename: 'index.html',
167169
template: 'views/index.pug',
168-
inject: true
170+
inject: 'body',
169171
}),
170172

171173
...utils.pages(env), // env, public path, parent folder

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
"version": "0.0.1",
44
"description": "My project description",
55
"author": {
6-
"name" : "Edgardo Ramírez León",
7-
"email" : "me@edgardo.com",
8-
"url" : "https://edgardorl.com"
9-
},
6+
"name": "Edgardo Ramírez León",
7+
"email": "me@edgardo.com",
8+
"url": "https://edgardorl.com"
9+
},
1010
"main": "app.js",
1111
"repository": "git@github.com:my-user/my-repo.git",
1212
"license": "MIT",
@@ -41,6 +41,7 @@
4141
"postcss-import": "^14.0.2",
4242
"postcss-loader": "^5.3.0",
4343
"postcss-modules": "^4.0.0",
44+
"postcss-preset-env": "^6.7.0",
4445
"pug": "^3.0.2",
4546
"pug-loader": "^2.4.0",
4647
"rimraf": "^3.0.2",

postcss.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
module.exports = {
22
plugins: {
33
'postcss-import': {},
4-
'postcss-cssnext': {
4+
'postcss-preset-env': {
55
browsers: ['last 2 versions', '> 5%'],
6-
},
6+
}
77
},
88
};

0 commit comments

Comments
 (0)