This repository has been archived by the owner on Sep 29, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Set webpack target to node * Remove unused import * Update CHANGELOG * Build multiple target * Use web config for styleguidist
- Loading branch information
1 parent
6083d81
commit a416737
Showing
7 changed files
with
87 additions
and
57 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
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
import css from "@emotion/css"; | ||
import { TextAlignProperty } from "csstype"; | ||
|
||
export const landscapeBook = { | ||
|
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
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,54 @@ | ||
const CleanWebpackPlugin = require('clean-webpack-plugin'); | ||
const { CheckerPlugin } = require('awesome-typescript-loader'); | ||
const path = require('path'); | ||
|
||
const srcDir = path.join(__dirname, 'src'); | ||
const outDir = path.join(__dirname, 'dist'); | ||
|
||
module.exports = { | ||
entry: path.join(srcDir, 'index.ts'), | ||
output: { | ||
path: outDir, | ||
}, | ||
mode: 'production', | ||
devtool: 'source-map', | ||
externals: { | ||
react: 'react', | ||
'react-dom': 'react-dom', | ||
'react-dom/server': 'react-dom/server', | ||
}, | ||
resolve: { | ||
extensions: ['.ts', '.tsx', '.js', '.jsx'], | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
enforce: 'pre', | ||
test: /\.(ts|tsx)$/, | ||
include: srcDir, | ||
use: ['tslint-loader'], | ||
}, | ||
{ | ||
test: /\.(ts|tsx)$/, | ||
include: srcDir, | ||
use: ['babel-loader', 'awesome-typescript-loader'], | ||
}, | ||
{ | ||
test: /\.svg$/, | ||
use: [ | ||
{ | ||
loader: '@svgr/webpack', | ||
options: { | ||
prettier: false, | ||
svgo: false, | ||
}, | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
plugins: [ | ||
new CleanWebpackPlugin([outDir]), | ||
new CheckerPlugin(), | ||
], | ||
}; |
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 |
---|---|---|
@@ -1,56 +1,7 @@ | ||
const CleanWebpackPlugin = require('clean-webpack-plugin'); | ||
const { CheckerPlugin } = require('awesome-typescript-loader'); | ||
const path = require('path'); | ||
const webConfig = require('./webpack.config.web'); | ||
const nodeConfig = require('./webpack.config.node'); | ||
|
||
const srcDir = path.join(__dirname, 'src'); | ||
const outDir = path.join(__dirname, 'dist'); | ||
|
||
module.exports = { | ||
entry: path.join(srcDir, 'index.ts'), | ||
output: { | ||
path: outDir, | ||
filename: 'index.js', | ||
libraryTarget: 'commonjs2', | ||
}, | ||
mode: 'production', | ||
devtool: 'source-map', | ||
externals: { | ||
react: 'react', | ||
'react-dom': 'react-dom', | ||
'react-dom/server': 'react-dom/server', | ||
}, | ||
resolve: { | ||
extensions: ['.ts', '.tsx', '.js', '.jsx'], | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
enforce: 'pre', | ||
test: /\.(ts|tsx)$/, | ||
include: srcDir, | ||
use: ['tslint-loader'], | ||
}, | ||
{ | ||
test: /\.(ts|tsx)$/, | ||
include: srcDir, | ||
use: ['babel-loader', 'awesome-typescript-loader'], | ||
}, | ||
{ | ||
test: /\.svg$/, | ||
use: [ | ||
{ | ||
loader: '@svgr/webpack', | ||
options: { | ||
prettier: false, | ||
svgo: false, | ||
}, | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
plugins: [ | ||
new CleanWebpackPlugin([outDir]), | ||
new CheckerPlugin(), | ||
], | ||
}; | ||
module.exports = [ | ||
webConfig, | ||
nodeConfig, | ||
]; |
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,13 @@ | ||
const _ = require('lodash'); | ||
const commonConfig = require('./webpack.config.common'); | ||
|
||
module.exports = _.merge({}, | ||
commonConfig, | ||
{ | ||
target: 'node', | ||
output: { | ||
filename: 'index.node.js', | ||
libraryTarget: 'commonjs2', | ||
}, | ||
}, | ||
); |
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,12 @@ | ||
const _ = require('lodash'); | ||
const commonConfig = require('./webpack.config.common'); | ||
|
||
module.exports = _.merge({}, | ||
commonConfig, | ||
{ | ||
output: { | ||
filename: 'index.js', | ||
libraryTarget: 'commonjs2', | ||
}, | ||
}, | ||
); |