diff --git a/static/css/directives/components/main.scss b/static/css/directives/components/main.scss deleted file mode 100644 index 2fe8e44da..000000000 --- a/static/css/directives/components/main.scss +++ /dev/null @@ -1 +0,0 @@ -@import 'pages/repo-page/repo-page'; diff --git a/static/js/app.tsx b/static/js/app.tsx index 7378837ac..ad9cebbc9 100644 --- a/static/js/app.tsx +++ b/static/js/app.tsx @@ -1,6 +1,3 @@ -// Import Styles -import '../css/directives/components/main.scss'; - // Import Components import {rpDirectives as repoPage} from "./directives/components/pages/repo-page/main"; diff --git a/static/js/directives/components/pages/repo-page/main.tsx b/static/js/directives/components/pages/repo-page/main.tsx index 9db546f49..91c3422aa 100644 --- a/static/js/directives/components/pages/repo-page/main.tsx +++ b/static/js/directives/components/pages/repo-page/main.tsx @@ -1,3 +1,4 @@ +import "sass/repo-page/repo-page.scss"; import * as angular from "angular"; import repoHeader from "./header"; diff --git a/tsconfig.json b/tsconfig.json index 777ef617c..39b63f61b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,10 +1,14 @@ { "compilerOptions": { + "baseUrl": ".", "jsx": "react", "module": "commonjs", "outDir": "./build/", "target": "es5", - "sourceMap": true + "sourceMap": true, + "paths": { + "sass/*": ["./static/css/directives/components/pages/*"] + } }, "exclude": [ "node_modules" diff --git a/webpack.config.js b/webpack.config.js index 633900093..b5029b6d5 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -8,7 +8,10 @@ var config = { filename: "bundle.js" }, resolve: { - extensions: ["", ".ts", ".tsx", ".js"] + extensions: ["", ".ts", ".tsx", ".js", ".scss"], + alias: { + "sass": path.resolve('./static/css/directives/components/pages/') + } }, module: { loaders: [ @@ -19,7 +22,8 @@ var config = { }, { test: /\.scss$/, - loaders: ['style', 'css', 'sass'] + loaders: ['style', 'css', 'sass'], + exclude: /node_modules/ } ] }