Solidjs library rollup configuration: unresolved dependencies - rollupjs

I try to build a solidjs npm lib using rollup to provide some components. I intend to build esm and cjs module using the following rollup.config.js:
import commonjs from "rollup-plugin-commonjs";
import typescript from "rollup-plugin-typescript2";
import babel from "#rollup/plugin-babel";
import postcss from "postcss";
import nodeResolve from "#rollup/plugin-node-resolve";
export default {
input: "./src/index.ts",
output: [
{
file: "dist/index.cjs.js",
format: "cjs",
},
{
file: "dist/index.esm.js",
format: "esm",
},
],
external: [
"#suid",
"#suid/icons-material",
"#suid/material",
"solid-js",
"solid-js/web",
],
plugins: [
nodeResolve(),
resolve(),
commonjs(),
postcss({
autoModules: true,
plugins: [],
sourceMap: true,
extract: true,
minimize: true,
}),
typescript(),
babel({
babelHelpers: "bundled",
exclude: "node_modules/**",
extensions: [".ts", ".tsx"],
}),
],
};
Unfortunately, i cannot build this. Here's the error message:
(!) Unresolved dependencies
https://rollupjs.org/guide/en/#warning-treating-module-as-external-dependency
~/MonthPicker.module.css (imported by "src/MonthPicker.tsx")
~/DatePicker.module.css (imported by "src/DatePicker.tsx")
#suid/icons-material/ExpandLess (imported by "src/MonthPicker.tsx")
#suid/icons-material/ExpandMore (imported by "src/MonthPicker.tsx")
created dist/index.cjs.js, dist/index.esm.js in 849ms
If I understood correctly, nodeResolve() is supposed to help here, but i guess i have misconfigured it.
EDITS:
added postcss as #snnsnn proposed
removed babel from this post (it seems this is a rollup issue)

You are missing postCss plugin.
https://www.npmjs.com/package/rollup-plugin-postcss
Edit:
You are missing some peer dependencies like postcss, #babel/core and I believe that is why you receive "unresolved dependencies" error. I installed them as dev dependencies, but it is better if you add them as peerDependencies:
{
"dependencies": {
"#suid/icons-material": "^0.5.1",
"#suid/material": "^0.8.0",
"babel-plugin-react-css-modules": "^5.2.6",
"rollup-plugin-postcss": "^4.0.2",
"rollup-plugin-postcss-modules": "^2.1.1",
"solid-js": "^1.6.9",
"suid": "^1.0.0"
},
"devDependencies": {
"#babel/core": "^7.20.12",
"#rollup/plugin-babel": "^6.0.3",
"#rollup/plugin-node-resolve": "^15.0.1",
"#suid/vite-plugin": "^0.1.0",
"#types/node": "^18.11.18",
"#typescript-eslint/eslint-plugin": "^5.48.1",
"#typescript-eslint/parser": "^5.48.0",
"eslint": "^8.31.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-airbnb-typescript": "^17.0.0",
"eslint-config-prettier": "^8.6.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-solid": "^0.9.1",
"postcss": "^8.4.21",
"prettier": "^2.8.2",
"rollup": "^3.10.0",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-typescript2": "^0.34.1",
"typescript": "^4.8.2",
"vite": "^4.0.4",
"vite-plugin-solid": "^2.5.0"
}
}
Used following rollup.config.js:
import commonjs from "rollup-plugin-commonjs";
import resolve from "rollup-plugin-node-resolve";
import typescript from "rollup-plugin-typescript2";
import babel from "#rollup/plugin-babel";
import nodeResolve from "#rollup/plugin-node-resolve";
import postcss from 'rollup-plugin-postcss-modules';
export default {
input: "./src/index.tsx",
output: [
{
file: "dist/index.cjs.js",
format: "cjs",
},
{
file: "dist/index.esm.js",
format: "esm",
},
],
external: [
"#suid",
"#suid/icons-material",
"#suid/material",
"solid-js",
"solid-js/web",
],
plugins: [
nodeResolve(),
resolve(),
commonjs(),
postcss({
autoModules: true,
plugins: [],
sourceMap: true,
extract: true,
minimize: true,
}),
typescript(),
babel({
babelHelpers: "bundled",
exclude: "node_modules/**",
extensions: [".ts", ".tsx"],
}),
],
};
Used a simple application as index.tsx:
import { render } from 'solid-js/web';
import style from './app.module.css';
export const App = () => {
const handleClick = () => {
console.log('Clicking');
};
return (
<div class={style.app}>
App! <button onClick={handleClick}>Some Button</button>
</div>
);
};
render(App, document.body);
Your project compiles:
pnpm run build
> #edelmeier/solid-timeline#0.0.1 build **snipped**/solid-timeline
> rollup -c
./src/index.tsx → dist/index.cjs.js, dist/index.esm.js...
created dist/index.cjs.js, dist/index.esm.js in 1.6s

Related

Rollup Error in pnpm-workspace monorepo:'default' is not exported by ../../node_modules/.pnpm/classnames#2.3.1/node_modules/classnames/index.js

I have a UI lib repo , which could working well with below rollup config
My rollup.conf.js
import babel from '#rollup/plugin-babel';
import commonjs from '#rollup/plugin-commonjs';
import json from '#rollup/plugin-json';
import postcss from 'rollup-plugin-postcss';
import { nodeResolve } from '#rollup/plugin-node-resolve';
import { terser } from 'rollup-plugin-terser';
import typescript from 'rollup-plugin-typescript2';
import { DEFAULT_EXTENSIONS } from '#babel/core';
const isProd = process.env.NODE_ENV === 'production';
const pkg = require('./package.json');
const dependencies = Object.keys(pkg.peerDependencies);
export default {
input: './components/index.ts',
output: [
{
format: 'umd',
name: pkg.name,
file: 'lib/index.main.js',
globals: {
antd: 'antd',
'antd-mobile': 'antd-mobile',
react: 'react',
'react-dom': 'react-dom',
'styled-components': 'styled-components',
},
},
{
format: 'es',
name: pkg.name,
file: 'lib/index.module.js',
globals: {
antd: 'antd',
'antd-mobile': 'antd-mobile',
react: 'react',
'react-dom': 'react-dom',
'styled-components': 'styled-components',
},
},
],
onwarn: function (warning) {
if (warning.code === 'CIRCULAR_DEPENDENCY') {
return;
}
if ( warning.code === 'THIS_IS_UNDEFINED' ) { return; };
console.error(`(!) ${warning.message}`);
},
plugins: [
typescript({
include: ['*.ts+(|x)', '**/*.ts+(|x)'],
exclude: 'node_modules/**',
typescript: require('typescript'),
}),
babel({
exclude: 'node_modules/**',
babelHelpers: 'runtime',
extensions: [...DEFAULT_EXTENSIONS, '.ts', 'tsx'],
}),
nodeResolve({
mainField: ['jsnext:main', 'browser', 'module', 'main'],
browser: true,
}),
commonjs(),
json(),
postcss({
// Minimize CSS, boolean or options for cssnano.
minimize: isProd,
// Enable sourceMap.
sourceMap: !isProd,
// This plugin will process files ending with these extensions and the extensions supported by custom loaders.
extensions: ['.less', '.css'],
use: [['less', { javascriptEnabled: true, modifyVars: { '#primary-color': '#42b983' } }]],
}),
isProd && terser(),
],
external: dependencies,
};
however , when i am using pnpm workspace and try to manage it inside , below error showing:
The Error I'm getting and don't know to solve
[!] Error: 'default' is not exported by ../../node_modules/.pnpm/classnames#2.3.1/node_modules/classnames/index.js, imported by ../../node_modules/.pnpm/antd#4.16.13_react-dom#16.13.1+react#16.13.1/node_modules/antd/es/empty/index.js
https://rollupjs.org/guide/en/#error-name-is-not-exported-by-module
../../node_modules/.pnpm/antd#4.16.13_react-dom#16.13.1+react#16.13.1/node_modules/antd/es/empty/index.js (18:7)
16:
17: import * as React from 'react';
18: import classNames from 'classnames';
^
19: import { ConfigContext } from '../config-provider';
20: import LocaleReceiver from '../locale-provider/LocaleReceiver';
Error: 'default' is not exported by ../../node_modules/.pnpm/classnames#2.3.1/node_modules/classnames/index.js, imported by ../../node_modules/.pnpm/antd#4.16.13_react-dom#16.13.1+react#16.13.1/node_modules/antd/es/empty/index.js
at error (/Users/yejinlei/Documents/playground/personal/pnpm-workspace/node_modules/.pnpm/rollup#2.57.0/node_modules/rollup/dist/shared/rollup.js:158:30)
at Module.error (/Users/yejinlei/Documents/playground/personal/pnpm-workspace/node_modules/.pnpm/rollup#2.57.0/node_modules/rollup/dist/shared/rollup.js:12339:16)
at Module.traceVariable (/Users/yejinlei/Documents/playground/personal/pnpm-workspace/node_modules/.pnpm/rollup#2.57.0/node_modules/rollup/dist/shared/rollup.js:12724:29)
at ModuleScope.findVariable (/Users/yejinlei/Documents/playground/personal/pnpm-workspace/node_modules/.pnpm/rollup#2.57.0/node_modules/rollup/dist/shared/rollup.js:11517:39)
 ELIFECYCLE  Command failed with exit code 1.
the https://rollupjs.org/guide/en/#error-name-is-not-exported-by-module page does not really help, since the namedExports has been no longer working.
"#babel/core": "^7.12.9",
"#rollup/plugin-babel": "^5.2.2",
"#rollup/plugin-commonjs": "^17.0.0",
"#rollup/plugin-json": "^4.1.0",
"#rollup/plugin-node-resolve": "^11.0.0",
"rimraf": "3.0.2",
"rollup-plugin-postcss": "^4.0.1",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript2": "^0.30.0",
"tslib": "^2.0.3",
"typescript": "^4.1.2"
its a lib repo that integrated with antd. antd-mobile, which currently using React for UI development.
Try regex in rollup.config.js under plugins:
babel({
babelHelpers: "bundled",
exclude: /node_modules/, // add this
}),

Compiling js via webpacker results in: SassError: expected "{"

I'm trying to use scss in my rails application, configured by webpacker. Whenever I run rails webpacker:compile, I get the following error:
ERROR in ./app/javascript/stylesheets/application.scss
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
SassError: expected "{".
╷
1 │ import api from "!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js";
│ ^
╵
app/javascript/stylesheets/application.scss 1:95 root stylesheet
I'm having trouble debugging this problem and would appreciate any help.
Dependencies
rails: 6.1
webpacker: 6.0.0.pre1
#webpack-cli/serve
webpack: 5.11
webpack-cli: 4.2
webpack-dev-server: 3.11
package.json
{
"name": "ostor",
"private": true,
"dependencies": {
"#popperjs/core": "^2.6.0",
"#rails/actioncable": "^6.1.2-1",
"#rails/activestorage": "^6.1.2-1",
"#rails/ujs": "^6.1.2-1",
"#rails/webpacker": "^6.0.0-beta.5",
"autoprefixer": "^10.2.4",
"bootstrap": "^v5.0.0-beta2",
"css-loader": "^5.0.2",
"css-minimizer-webpack-plugin": "^1.2.0",
"d3": "^6.2.0",
"jquery": "^3.5.1",
"mini-css-extract-plugin": "^1.3.7",
"postcss": "^8.2.6",
"postcss-loader": "^5.0.0",
"sass": "^1.32.7",
"sass-loader": "^11.0.1",
"style-loader": "^2.0.0",
"turbolinks": "^5.2.0",
"webpack": "^5.11.0",
"webpack-cli": "^4.2.0"
},
"version": "0.1.0",
"devDependencies": {
"#webpack-cli/serve": "^1.3.0",
"webpack-dev-server": "^3.11.2"
},
"babel": {
"presets": [
"./node_modules/#rails/webpacker/package/babel/preset.js"
]
},
"browserslist": [
"defaults"
]
}
config/webpack/base.js:
const { webpackConfig, merge } = require('#rails/webpacker')
const customConfig = {
module: {
rules: [
{
test: /\.s[ac]ss$/i,
exclude: /node_modules/,
use: [
// Creates `style` nodes from JS strings
"style-loader",
// Translates CSS into CommonJS
"css-loader",
// Compiles Sass to CSS
"sass-loader",
],
},
],
},
}
module.exports = merge(webpackConfig, customConfig)
app/javascript/packs/application.js
import ActiveStorage from "#rails/activestorage";
import * as RailsUjs from "#rails/ujs";
import Turbolinks from "turbolinks";
ActiveStorage.start();
RailsUjs.start();
Turbolinks.start();
import "channels";
import "bootstrap";
import "../stylesheets/application.scss";
Remove the custom config rules you added for SASS/SCSS. Webpacker 6 will provide the appropriate CSS rules for you when it detects you've installed css-loader, postcss-loader, mini-css-extract-plugin, etc.
For the shakapacker users:
You don't need to add the option:
test: /\.s[ac]ss$/i
in the "rules" section. You just need to add:
yarn add sass sass-loader
and:
extensions:
- .sass
- .scss
in your webpacker.yml file, and shakapacker will transpile sass/scss files.

Import npm packages

How should I import npm packages? If I just add lodash bundling goes from 6ms to 900ms!?
Is there no way to cache static dependencies?
If I add lodash to external, globals and customResolveOptions in rollup.config.js it is excluded from the bundle. But how could I add it in a libs.js file for example?
Here are my files:
app.js
import _ from 'lodash'
alert(_.concat(["hi", "hello"]))
rollup.config.js
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import uglify from 'rollup-plugin-uglify';
import babel from 'rollup-plugin-babel';
const production = !process.env.ROLLUP_WATCH;
export default {
input: 'src/index.js',
output: {
file: 'scripts/bundle.js',
format: 'iife',
sourcemap: true
},
plugins: [
resolve(),
commonjs(),
babel({
exclude: 'node_modules/**'
}),
production && uglify()
]
};
package.json
{
"devDependencies": {
"npm-run-all": "^4.1.2",
"rollup": "^0.55.5",
"rollup-plugin-commonjs": "^8.0.2",
"rollup-plugin-node-resolve": "^3.0.0",
"rollup-plugin-uglify": "^3.0.0",
"babel-core": "^6.26.3",
"babel-plugin-external-helpers": "^6.22.0",
"babel-preset-env": "^1.7.0",
"rollup-plugin-babel": "^3.0.4"
},
"dependencies": {
"lodash": "^4.17.10"
},
"scripts": {
"build": "rollup -c",
"watch": "rollup -c -w",
"dev": "npm-run-all --parallel watch"
},
...
}
You can manually separate the entrypoints for "libs" and source code to speed up your build:
rollup.config.js
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import uglify from 'rollup-plugin-uglify';
import babel from 'rollup-plugin-babel';
const production = !process.env.ROLLUP_WATCH;
export default [{
input: 'src/index.js',
output: {
file: 'scripts/bundle.js',
format: 'iife',
sourcemap: true,
globals: {
'lodash': '_',
},
},
external: ['lodash'],
plugins: [
babel(),
production && uglify()
]
}, {
input: 'src/common.js',
output: {
file: 'scripts/common.js',
format: 'umd',
name: 'window',
extend: true,
sourcemap: true
},
plugins: [
resolve(),
commonjs(),
production && uglify()
]
}];
common.js
export { default as _ } from 'lodash'
It does add the overhead of maintaining the common.js file with libraries. Personally, I find it gives the best control over file size and compile time. If you're constantly installing and including new npm packages, this will be be hard to maintain.

Compile/Export sass with webpack 2

I've used Grunt and Gulp before so webpack is a bit new to me still.
Now I've configured webpack to successfully bundle my javascript perfectly. The issue I'm having now is bundling my sass and outputting the result to a file.
My understanding is that I have to use extract-text-webpack-plugin to extract the styles to its own file rather in inlining in <head>, but I'm not sure on this part. I'm looking to do the following for sass:
Compile the contents of src/main/stylesheets/**/*.scss
Output the contents to a single file app/assets/stylesheets/bundle.css
I know I can achieve this using gulp/grunt easily, but I'm trying to learn how webpack does things. My webpack.config.babel.js is as follows:
import path from "path";
import ExtractTextPlugin from "extract-text-webpack-plugin";
export default {
entry: {
index: path.join(__dirname, "src/main/javascripts/application.js")
},
output: {
path: path.join(__dirname, "app/assets/javascripts/"),
publicPath: "/assets/",
filename: "bundle.js"
},
module: {
rules: [
{
test: /\.scss$/,
include: path.join(__dirname, "src/main/stylesheets/"),
loader: ExtractTextPlugin.extract({
fallback: "style-loader",
use: [
{
loader: "css-loader",
query: { modules: false, sourceMaps: true }
},
{
loader: "sass-loader",
query: { sourceMaps: true }
}
]
})
},
{
test: /\.js$/,
include: path.join(__dirname, "src/main/javascripts/"),
exclude: /node_modules/,
use: [
{ loader: "babel-loader" }
],
}
]
},
plugins: [
new ExtractTextPlugin(path.join(__dirname, "app/assets/stylesheets/bundle.css"))
]
}
Dependencies from package.json if that matters:
"dependencies": {
"bootstrap-sass": "^3.3.7",
"jquery": "^3.1.1"
},
"devDependencies": {
"babel-core": "^6.23.1",
"babel-loader": "^6.3.1",
"babel-preset-env": "^1.1.8",
"css-loader": "^0.26.1",
"extract-text-webpack-plugin": "^2.0.0-rc.3",
"node-sass": "^4.5.0",
"sass-loader": "^6.0.0",
"style-loader": "^0.13.1"
}
Posting here because there isn't really room in the comments...if you have a link to the repo I might be able to be more helpful. Your syntax doesn't look wrong necessarily, but I am posting this because it's the most recent example I have that I know works: you might want to try using option instead of query. It doesn't look like query is deprecated based on the documentation, but this setup worked for me (although I wasn't using extract here),
{
test: /\.scss$/,
use: [
'style-loader?sourceMap',
{
loader: 'css-loader',
options: {
sourceMap: true,
importLoaders: 2,
}
},
'postcss-loader?sourceMap',
'sass-loader?sourceMap'
],
exclude: [path.resolve('node_modules')],
},

templateUrl in Angular2 Component not loading URL

this is my Component
import { Component, OnInit } from '#angular/core';
#Component({
selector: 'homeView',
templateUrl: '/home/home'
})
export class HomeViewComponent implements OnInit {
ngOnInit(): void {}
}
I am using AngularJS 2 with TypeScript 1.8.5 and trying to create component that will load template from Controller Action.
I am getting this error
main.bundle.js:667 Uncaught Error: Cannot find module ".//home/home"
I also tried it with home/home, the error is almost the same
main.bundle.js:667 Uncaught Error: Cannot find module "./home/home"
Error is not compile time error however - it pops up in browser console when page and the component is being loaded
So as you can see i dont want to load static template like home.template.html - that is working correctly. I want to load an HTML template from asp.net MVC Controller Action. I am not even hitting the debug point in the HomeController Home action.
Is there any way to make this work ? Seems like Angular keeps inserting this './' sign. Is there a way to configure this ? I ve read several tutorials on angular2 + mvc and it seems that this should be possible, but for some reason its not working for me.
My app.routes.ts
import {Routes} from "#angular/router";
import {MainViewComponent} from "../views/main-view/main-view.component";
import {MinorViewComponent} from "../views/minor-view/minor-view.component";
import {HomeViewComponent} from "../views/home-view/home-view.component";
export const ROUTES:Routes = [
// Main redirect
{ path: '', redirectTo: 'mainView', pathMatch: 'full'},
// App views
{path: 'mainView', component: MainViewComponent},
{path: 'minorView', component: MinorViewComponent},
{path: 'homeView', component: HomeViewComponent}
// Handle all other routes
//{path: '**', component: MainViewComponent }
];
app.module.ts
#NgModule({
declarations: [AppComponent],
imports : [
// Angular modules
BrowserModule,
HttpModule,
// Views
MainViewModule,
MinorViewModule,
// Modules
NavigationModule,
FooterModule,
TopnavbarModule,
RouterModule.forRoot(Approutes.ROUTES)
],
providers : [{provide: LocationStrategy, useClass: HashLocationStrategy}],
bootstrap : [AppComponent]
})
export class AppModule {}
EDIT : Some more info :
packages.json
{
"name": "inspinia_angular2_starter",
"version": "1.0.0",
"description": "Inspinia Admin Theme",
"repository": "https://wrapbootstrap.com/theme/inspinia-responsive-admin-theme-WB0R5L90S",
"scripts": {
"typings-install": "typings install",
"postinstall": "npm run typings-install",
"build": "webpack --inline --colors --progress --display-error-details --display-cached",
"server": "webpack-dev-server --inline --colors --progress --display-error-details --display-cached --port 3000 --content-base src",
"start": "npm run server"
},
"dependencies": {
"#angular/common": "2.0.0",
"#angular/compiler": "2.0.0",
"#angular/core": "2.0.0",
"#angular/forms": "2.0.0",
"#angular/http": "2.0.0",
"#angular/platform-browser": "2.0.0",
"#angular/platform-browser-dynamic": "2.0.0",
"#angular/router": "3.0.0",
"#angular/upgrade": "2.0.0",
"angular2-in-memory-web-api": "0.0.20",
"animate.css": "3.1.1",
"bootstrap": "^3.3.7",
"core-js": "^2.4.1",
"font-awesome": "^4.6.1",
"ie-shim": "^0.1.0",
"jquery": "^3.1.0",
"metismenu": "^2.5.0",
"pace": "0.0.4",
"pace-progress": "^1.0.2",
"reflect-metadata": "^0.1.3",
"rxjs": "5.0.0-beta.12",
"systemjs": "0.19.27",
"typings": "^1.3.2",
"zone.js": "^0.6.23"
},
"devDependencies": {
"angular2-template-loader": "^0.4.0",
"awesome-typescript-loader": "^1.1.1",
"bootstrap-webpack": "0.0.5",
"css-loader": "^0.23.1",
"exports-loader": "^0.6.3",
"expose-loader": "^0.7.1",
"extract-text-webpack-plugin": "^1.0.1",
"file-loader": "^0.9.0",
"imports-loader": "^0.6.5",
"raw-loader": "^0.5.1",
"style-loader": "^0.13.1",
"to-string-loader": "^1.1.4",
"typescript": "~1.8.5",
"url-loader": "^0.5.7",
"webpack": "^1.12.9",
"webpack-dev-server": "^1.14.0",
"webpack-merge": "^0.8.4"
}
}
tsconfig.json
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"outDir": "dist",
"rootDir": ".",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"moduleResolution": "node"
},
"exclude": [
"node_modules",
"bower_components"
],
"awesomeTypescriptLoaderOptions": {
"useWebpackText": true
},
"compileOnSave": false,
"buildOnSave": false,
"atom": {
"rewriteTsconfig": false
}
}
App is built using webpack
main.browser.ts
import {platformBrowserDynamic} from "#angular/platform-browser-dynamic";
import {AppModule} from "../src/app/app.module";
/*
* Bootstrap Angular app with a top level NgModule
*/
platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.error(err));
So, after what seemed like an eternity I finally got the the bottom of this.
The problem was in webpack using angular2-template-loader.
This module is responsible for inlining html template. In other words, it will do a require (using your templateUrl) behind the scenes on the template tag of your component. This, of course, breaks the functionality if you are using actual URLs as templateUrl and not PATHs, therefore the template is not there.
Based on what i read, it seems like the authors wont support this in the future. (If template is not found -> try to load it from URL)
More info here - https://github.com/angular/angular-cli/issues/1605
So, basically I just removed this component from config file :
webpack.config.js
BEFORE
module: {
loaders: [
{
test: /\.ts$/,
loaders: ['awesome-typescript-loader', 'angular2-template-loader']
},
{
test: /\.css$/,
loader:
AFTER
module: {
loaders: [
{
test: /\.ts$/,
loaders: ['awesome-typescript-loader']
},
{
test: /\.css$/,
loader:

Resources