i constructing typescript webapp using webpack. modules can imported being written in webpack.config.js file below. how many times tried, bootstrap module won't imported app.
how should ?
here part of webpack.config.js
plugins: [ new webpack.resolverplugin( new webpack.resolverplugin.directorydescriptionfileplugin('.bower.json', ['main']) ), new webpack.provideplugin({ jquery: 'jquery', $: 'jquery', jquery: 'jquery', _: 'lodash', vue: 'vue' }), new webpack.optimize.dedupeplugin(), new webpack.optimize.aggressivemergingplugin() ], module: { loaders: [ { test: /\.ts$/, loader: 'ts-loader' } ] }
i , fortunately have found answer.
the answer use bowerwebpackplugin instead of webpack.resolverplugin.directorydescriptionfileplugin
plugins: [ new bowerwebpackplugin({ modulesdirectories: ['bower_components'], manifestfiles: ['bower.json', 'package.json'], includes: [/.*\.js/], excludes: [/.*\.less/], searchresolvemodulesdirectories: true }), new webpack.provideplugin({ jquery: 'jquery', $: 'jquery', jquery: 'jquery', _: 'lodash', vue: 'vue' }), new webpack.optimize.dedupeplugin(), new webpack.optimize.aggressivemergingplugin() ], module: { loaders: [ { test: /\.ts$/, loader: 'ts-loader' } ] }
Comments
Post a Comment