Skip to content
This repository was archived by the owner on Nov 12, 2019. It is now read-only.

【参考】Stylusを使うWebpackの設定【マージしないで】 #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions sample_webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"css-loader": "^0.25.0",
"file-loader": "^0.9.0",
"style-loader": "^0.13.1",
"stylus": "^0.54.5",
"stylus-loader": "^2.3.1",
"webpack": "^1.13.2",
"webpack-dev-server": "^1.15.1"
}
Expand Down
Empty file removed sample_webpack/src/App.css
Empty file.
2 changes: 2 additions & 0 deletions sample_webpack/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import injectTapEventPlugin from 'react-tap-event-plugin';
import MyAwesomeReactComponent from './MyAwesomeReactComponent';

import './App.styl';

injectTapEventPlugin();

class App extends Component {
Expand Down
2 changes: 2 additions & 0 deletions sample_webpack/src/App.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
body
background #888
5 changes: 4 additions & 1 deletion sample_webpack/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ module.exports = {
context: __dirname + "/src",
entry: {
js: "./App.js",
css: "./App.css",
html: "./index.html",
},
output: {
Expand All @@ -27,6 +26,10 @@ module.exports = {
test: /\.css/,
loader: 'style!css'
},
{
test: /\.styl/,
loader: 'style!css!stylus'
},
{
test: /\.html$/,
loader: 'file?name=[path][name].[ext]'
Expand Down