Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
feat: add webpack resolver (#231)
  • Loading branch information
cap-Bernardito committed Sep 8, 2020
1 parent 8e9c183 commit da566a6
Show file tree
Hide file tree
Showing 18 changed files with 433 additions and 1,138 deletions.
2 changes: 1 addition & 1 deletion babel.config.js
Expand Up @@ -16,4 +16,4 @@ module.exports = (api) => {
],
],
};
};
};
17 changes: 10 additions & 7 deletions bench/fixtures/imports/webpack.config.js
@@ -1,29 +1,32 @@
// Just run "webpack-dev-server"
function plugin() {
return function(style) {
style.define('add', function(a, b) {
return (style) => {
style.define('add', (a, b) => {
return a.operate('+', b);
});
};
}

module.exports = {
context: __dirname,
entry: "./index.js",
entry: './index.js',
output: {
path: __dirname + '/tmp',
path: `${__dirname}/tmp`,
filename: 'bundle.js',
},
resolve: {
extensions: ["", ".js", ".css", ".styl"]
extensions: ['', '.js', '.css', '.styl'],
},
module: {
loaders: [
{
test: /\.styl$/,
loader: 'style-loader!css-loader!' + require('path').join(__dirname, '../../../index'),
loader: `style-loader!css-loader!${require('path').join(
__dirname,
'../../../index'
)}`,
},
]
],
},
stylus: {
use: [plugin()],
Expand Down
221 changes: 0 additions & 221 deletions index.js

This file was deleted.

52 changes: 48 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -42,7 +42,7 @@
"webpack": "^4.0.0 || ^5.0.0"
},
"dependencies": {
"loader-utils": "^1.0.2",
"loader-utils": "^2.0.0",
"lodash.clonedeep": "^4.5.0",
"schema-utils": "^2.7.1",
"when": "~3.6.x"
Expand Down

0 comments on commit da566a6

Please sign in to comment.