-
Notifications
You must be signed in to change notification settings - Fork 486
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create config module that contains webpack common configuration | Fixes
- Loading branch information
1 parent
3d9e4e2
commit 1369f94
Showing
3 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "clay-config", | ||
"version": "2.1.12", | ||
"description": "Configuration files for Clay components", | ||
"license": "BSD", | ||
"main": "src/all/config.js", | ||
"repository": "https://github.com/liferay/clay/tree/master/packages/clay-config", | ||
"dependencies": { | ||
"webpack": "^3.0.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const webpackCommonConfig = require('../webpack-common.config'); | ||
|
||
module.exports = { | ||
webpackCommonConfig | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
const webpack = require('webpack'); | ||
|
||
module.exports = { | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.js$/, | ||
exclude: /(node_modules|bower_components)/, | ||
use: { | ||
loader: 'babel-loader', | ||
options: { | ||
compact: false, | ||
presets: ['babel-preset-env'], | ||
plugins: ['babel-plugin-transform-node-env-inline'], | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
devtool: 'cheap-module-source-map', | ||
output: { | ||
library: 'metal', | ||
libraryTarget: 'this', | ||
}, | ||
plugins: [new webpack.optimize.ModuleConcatenationPlugin()], | ||
resolve: { | ||
mainFields: ['esnext:main', 'main'], | ||
}, | ||
}; |