Skip to content

Commit

Permalink
fix: add missing scss plugins (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
lottamus authored May 2, 2019
1 parent c1d9561 commit 9baec38
Show file tree
Hide file tree
Showing 3 changed files with 221 additions and 10 deletions.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"@storybook/addons": "5.0.11",
"@storybook/core": "5.0.11",
"@storybook/react": "5.0.11",
"@types/node": "^11.13.8",
"@types/react": "^16.8.15",
"@types/react-dom": "^16.8.4",
"@types/storybook__addon-actions": "3.4.x",
Expand All @@ -58,6 +59,8 @@
"babel-loader": "8.x.x",
"css-loader": "^2.1.1",
"node-sass": "^4.12.0",
"node-sass-package-importer": "^5.3.1",
"postcss-import": "^12.0.1",
"postcss-loader": "^3.0.0",
"sass-loader": "^7.1.0",
"style-loader": "^0.23.1",
Expand Down
4 changes: 3 additions & 1 deletion src/webpack.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const path = require('path');
const webpack = require('webpack');
const PackageImporter = require('node-sass-package-importer');

const cwd = process.cwd();

Expand Down Expand Up @@ -86,6 +87,7 @@ module.exports = ({ config }: any) => {
options: {
sourceMap: true,
plugins: [
require('postcss-import'),
require('autoprefixer')({
env: 'last 2 Chrome versions, last 2 Firefox versions, last 1 Safari version',
}),
Expand All @@ -96,7 +98,7 @@ module.exports = ({ config }: any) => {
loader: require.resolve('sass-loader'),
options: {
sourceMap: true,
includePaths: [path.resolve(cwd, 'node_modules')],
importer: [PackageImporter()],
},
},
],
Expand Down
Loading

0 comments on commit 9baec38

Please sign in to comment.