UNPKG

sb-pagetitle

Version:

Social Blue Page Title

63 lines (57 loc) 1.64 kB
var path = require('path'); var webpack = require('webpack'); const entry = { 'index': path.resolve('./sb-pagetitle.vue'), 'demo': path.resolve('./examples/demo.js'), }; const output = { filename: './dist/[name].js', libraryTarget: 'umd', // These options are useful if the user wants to load the module with AMD library: 'sb-pagetitle', umdNamedDefine: true }; const config = { entry: entry, output: output, module: { loaders: [{ test: /\.js$/, loader: 'babel-loader', exclude: /node_modules/ }, { test: /\.vue$/, loader: 'vue-loader', options: { esModule: false, loaders: { scss: 'vue-style-loader!css-loader?{"url":false,"minimize":false,"sourceMap":false}!sass-loader', // <style lang="scss"> //sass: 'vue-style-loader!css-loader!sass-loader?indentedSyntax' // <style lang="sass"> }, } } ] }, resolve: { alias: { 'vue$': 'vue/dist/vue.esm.js', 'Scss': path.resolve('./scss'), //'Fonts': path.resolve('./src/fonts'), //'Images': path.resolve('./src/images'), }, modules: [ path.resolve('./'), path.resolve('./node_modules') ] }, plugins: [] }; if (process.env.NODE_ENV === 'production') { config.plugins.push( new webpack.optimize.UglifyJsPlugin({ compress: { warnings: false, } })); } module.exports = config;