diff --git a/.gitignore b/.gitignore index 166082c..1711fda 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,4 @@ build coverage node_modules /lib -**/*.soy.js +src/**/*.soy.js \ No newline at end of file diff --git a/webpack.config.soy.js b/webpack.config.soy.js new file mode 100644 index 0000000..d9ca524 --- /dev/null +++ b/webpack.config.soy.js @@ -0,0 +1,35 @@ +const webpack = require('webpack'); + +module.exports = { + entry: './src/soy/TodoApp.js', + module: { + rules: [{ + test: /\.js$/, + exclude: /(node_modules)/, + use: { + loader: 'babel-loader', + options: { + compact: false, + presets: ['babel-preset-es2015'] + } + } + }, { + test: /\.scss$/, + use: [{ + loader: "style-loader" + }, { + loader: "css-loader" + }, { + loader: "sass-loader" + }] + }] + }, + output: { + library: 'metal', + libraryTarget: 'this', + filename: './build/globals/todo-app.js' + }, + plugins: [ + new webpack.optimize.ModuleConcatenationPlugin() + ] +};