Comments (4)
node npm webpack ts versions?
from ngx-bootstrap.
Hi,
I must do something wrong with webpack, because if I use the complete path (../../node_modules/ng2-bootstrap/ng2-bootstrap" in my import statment it's working like a charm. But the ts-loader of webpack is complaining when I use the lib form "ng2-bootstrap/ng2-bootstrap"...
node: v4.2.2
npm: 2.14.7
webpack: 1.12.9
ts-loader: 0.7.2
Here is my webpack conf:
var webpack = require('webpack');
var path = require('path');
var CompressionPlugin = require('compression-webpack-plugin');
/*eslint no-process-env:0, camelcase:0*/
var isProduction = (process.env.NODE_ENV || 'development') === 'production';
var src = 'src/public';
var dest = '/build';
var absDest = path.join(__dirname, dest);
var config = {
devtool: 'source-map',
debug: true,
cache: true,
context: __dirname,
resolve: {
root: __dirname,
extensions: ['', '.ts', '.js', '.json'],
alias: {}
},
resolveLoader: {
root: path.join(__dirname, 'node_modules'),
modulesDirectories: ['node_modules'],
fallback: path.join(__dirname, "node_modules")
},
entry: {
vendor: [
// Angular 2 Deps
'@reactivex/rxjs',
'zone.js',
'reflect-metadata',
'angular2/angular2',
'angular2/core',
'angular2/router',
'angular2/http',
'ng2-bootstrap/ng2-bootstrap'
],
app: [
'./src/app/bootstrap'
]
},
output: {
path: absDest,
filename: '[name].js',
sourceMapFilename: '[name].js.map',
chunkFilename: '[id].chunk.js'
},
// our Development Server configs
devServer: {
inline: true,
colors: true,
historyApiFallback: true,
contentBase: src,
publicPath: dest
},
module: {
loaders: [
// Support for *.json files.
{test: /\.json$/, loader: 'json'},
// Support for CSS as raw text
{test: /\.css$/, loader: 'raw'},
// support for .html as raw text
{test: /\.html$/, loader: 'raw'},
// Support for .ts files
{
test: /\.ts$/,
loader: 'ts',
exclude: [
/\.min\.js$/,
/\.spec\.ts$/,
/\.e2e\.ts$/
]
}
],
noParse: [
/rtts_assert\/src\/rtts_assert/
]
},
plugins: [
new webpack.optimize.CommonsChunkPlugin({
name: 'vendor',
minChunks: Infinity,
chunks: ['app'],
filename: 'vendor.js'
}),
new webpack.optimize.DedupePlugin({
__isProduction: isProduction
}),
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.optimize.DedupePlugin()
],
pushPlugins: function () {
if (!isProduction) {
return;
}
this.plugins.push.apply(this.plugins, [
//production only
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false,
drop_debugger: false
},
output: {
comments: false
},
beautify: false
}),
new CompressionPlugin({
asset: '{file}.gz',
algorithm: 'gzip',
regExp: /\.js$|\.html|\.css|.map$/,
threshold: 10240,
minRatio: 0.8
})
]);
},
stats: {colors: true, reasons: true}
};
config.pushPlugins();
module.exports = config;
Best
Daniel
from ngx-bootstrap.
typescript is complaining, typescipt version? (global)
from ngx-bootstrap.
typescript 1.6.2, local
from ngx-bootstrap.
Related Issues (20)
- One way binding for current page HOT 1
- Date picker firstDayOfWeek
- Typeahead i18n support
- Error installing ngx-bootstrap with angular 17 HOT 3
- Extend Datepicker's bsDaterangepicker
- Timepicker validation issue
- Allow for timepicker configuration to be honored when used with datepicker
- Enable some dates which is Disabled by daysDisabled property
- How to customize Theming?
- not able to apply the style using property binding in <ngx-datepicker> tag
- Bug: Invalid Input Handling in ngx-bootstrap Datepicker when using Min and Max date
- Date Picker not displaying years correctly on Firefox 123.0+ HOT 1
- Package.json exports "types" of component-loader / focus-trap / mini-ngrx do not reference the index.d.ts
- Using ngx-bootstrap v >=10 with bootstrap v3
- Loss of modal backdrop when opening second modal HOT 1
- a11y: Incorrect Usage of aria-expanded Attribute in ngx-bootstrap Typeahead Component
- Modal Transitions Class
- Version 11 of your online docs does not load
- facing issue when customize month order in locale Ja
- TimepickerComponent missing id and or name attribute on input
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngx-bootstrap.