>
> Oh yeah, forgot to say that the content of the bundle.js is mainly that
> big due to the different imports, of what appears to be in node_modules, at
> least I noticed there was decorators, rxjs, so I'm assuming that's what is
> happening.
>
On Wednesday, 28 September 2016 15:05:13 UTC+2, Ced c wrote:
>
> I want to publish a component.ts on npm, this component refers to
> ./component.css and ./component.html
>
> So i did use webpack to bundle everything but the resulting bundle.js is
> over 10k lines, while my component is a test component with only 1 line of
> html and 1 line of css.
>
> I tried looking at the doc, but there really isn't much on this topic. The
> only few tutorials I've found on the net advise to put the .css directly
> inside the .ts file, but that is not what I wish to achieve.
>
> Here is my webpack.config.json
>
>
> module.exports = {
>> entry: __dirname+ "/test.component.ts",
>> context: __dirname,
>> output: {
>> path: __dirname + "/dist",
>> filename: "bundle.js"
>> },
>> resolve: {
>> extensions: ['', '.js', '.ts']
>> },
>> module: {
>> loaders: [
>> {
>> test: /\.ts$/,
>> exclude:/node_modules/,
>> loaders: ['awesome-typescript-loader', 'angular2-template-loader']
>> },
>> {
>> test: /\.html$/,
>> exclude:/node_modules/,
>> loader: 'html'
>> },
>> {
>> test: /\.css$/,
>> exclude:/node_modules/,
>> loader: 'raw'
>> }
>> ]
>> }
>> };
>
>
>
>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.